Nautilus Scripts

Started from here, talked about Send To feature ( this feature is famous in Ms. Windows — i think ) , i just realized that i have missed another simple thing !!
I found something in wiki and something in unleashed.

If you need Copy-To script :

#! /bin/bash
location=`zenity --file-selection --directory --title="Select a directory"`
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

If you need Move-To script :

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

just copy the script to your text editor and save it to
~/.gnome2/nautilus-scripts/

But, don’t forget one more thing;
your script must be executable by typing
sudo chmod a+x ~/.gnome2/nautilus-scripts
in Terminal.

You can get Send-To script here
Open your Nautilus and the scripts will be there when you right-click on something ( press reload button if you didn’t see any )

Done !!!
~E~

Advertisements

Leave a comment

No comments yet.

Comments RSS TrackBack Identifier URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s