Any help with this new script?

Ian MacGregor fedora at ardchoille.org
Tue Oct 18 12:17:28 UTC 2005


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




More information about the fedora-list mailing list