Results 1 to 4 of 4

Thread: nautilus-script move/copy file

  1. #1
    Join Date
    Jun 2006
    Location
    netherlands
    Beans
    198
    Distro
    Ubuntu 11.04 Natty Narwhal

    nautilus-script move/copy file

    Hi, I'd like to have a nautilus scritp that moves a file to my home directory. I found the script below that should copy it. It doesn't work. why not?

    Code:
    #!/bin/sh
    # copyhome:  copies the selected file(s) to home directory
    # (if able)
    
    for arg 
    do
       if [ -f ~/"$arg" ];    then
          MSG="File: '$arg' already exists in home directory. Overwrite?"
          if    
             gdialog --title "Overwrite?" --defaultno --yesno "$MSG" 200 100 
          
          then
             cp "$arg" ~/"$arg"
          fi
       else
         cp "$arg" ~/"$arg"
       fi
    
    done
    We seek to resolve frustration and abide in a comfortable, relaxed mind. We call that 'happiness'. And still I believe in that next upgrade...
    --dell xps m1330 t9300 2.5ghz 4gb 320Gb Nvidia 8400m gs--
    --lenovo w520 2720QM 8Gb Nvidia Quadro 1000

  2. #2
    Join Date
    Nov 2006
    Beans
    105
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: nautilus-script move/copy file

    do you have to issue a command in a terminal to do this?

  3. #3
    Join Date
    Jun 2006
    Location
    netherlands
    Beans
    198
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: nautilus-script move/copy file

    no i use nautilus scripts located in /home/~user/.gnome2/nautilus-scripts/ and I find them in the menu under my right mouse button. Like the ones at http://g-scripts.sourceforge.net/ only I can't find out how to actually make them myself (properly). Hence the question above, what's wrong with the script?
    We seek to resolve frustration and abide in a comfortable, relaxed mind. We call that 'happiness'. And still I believe in that next upgrade...
    --dell xps m1330 t9300 2.5ghz 4gb 320Gb Nvidia 8400m gs--
    --lenovo w520 2720QM 8Gb Nvidia Quadro 1000

  4. #4
    Join Date
    Mar 2006
    Location
    Devon UK
    Beans
    419

    Re: nautilus-script move/copy file

    make sure the execute bit is set for the script also when copying/creating a new nautilus script in the scripts folder you may have to click the reload button to make nautilus regonize the changes
    In /dev/null no one can hear the kernel panic!
    Don't EVER use sudo rm -rf / . if you don't understand a command check it out first!
    BACK UP YOUR DATA OR YOU WILL LOSE IT!!
    Supergrub - The best thing since sliced bread www.supergrubdisk.org

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •