Any help with this new script?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, I'm almost done with this script.
Here is what I have so far:

#! /bin/bash
location=`zenity --entry`
for arg
do
if [ -e $location/$arg ];then
zenity --question --title="Conflict While Copying" --text="File "$location/$arg" already exists. Would you like to replace it?"
	case "$?" in
		1  )  exit 1 ;;
		0  )  cp $arg $location ;;
	esac
else
	cp $arg $location
fi
done

This script is intended as a nautilus script to allow the user to right-click on a file, choose a directory to copy the file to and have nautilus copy the file. Unfortunately this script works fine when selecting one file, but does not work when selecting multiple files.

Anyone know how to make this work when selecting multiple files?

Thank you,
Ian MacGregor


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux