June 22, 201016 yr Just want to run this script by as im still learn nix scripting Basically want to move downloaded movie folders and there contents to my main movie share so is this correct? mv * /mnt/user/sabnzbd/done/* /mnt/user/movies or should i use mmv?
June 22, 201016 yr Just want to run this script by as im still learn nix scripting Basically want to move downloaded movie folders and there contents to my main movie share so is this correct? mv * /mnt/user/sabnzbd/done/* /mnt/user/movies or should i use mmv? the first * means move files in the "current directory" which is probably not what you meant. make sure /mnt/user/movies is a directory and not a file. For the first time you run it do . mv -vi /mnt/user/sabnzbd/done/* /mnt/user/movies
June 22, 201016 yr heres a few tidbits on what that mv command does. I personally would highly recommend the -i like mentioned because you don't want to over write something that is already there. http://en.wikipedia.org/wiki/Mv
June 22, 201016 yr Author Created a script and placed it in the unmenu #define USER_SCRIPT_LABEL Move Movies #define USER_SCRIPT_DESCR Move Downloaded Movies to Movies Share #UNMENU_RELEASE $Revision: 7 $ $Date: 2010-03-29 23:12:23 -0400 (Mon, 29 Mar 2010) $ mv /mnt/user/sabnzbd/done/* /mnt/user/movies/ when i browse on the console it moved it too... /mnt/user/movies\r/ When I browse through the shares it shows as... /mnt/user/MWGPZL~3 Why didnt it work and how can i get the contents of the MWGPZL~3 folder moved? to movies Help
June 22, 201016 yr Author I worked it out... within the done folder sabnzbd creates movies subdirectory so it should read mv /mnt/user/sabnzbd/movies/* /mnt/user/movies/ Doh! So I still need to move the movie into the correct folder!
June 22, 201016 yr I worked it out... within the done folder sabnzbd creates movies subdirectory so it should read mv /mnt/user/sabnzbd/movies/* /mnt/user/movies/ Doh! So I still need to move the movie into the correct folder! Easiest way, type mc and use midnight commander to move the files as needed. It can also help you rename the "movies\r" directory to "movies" or just to remove it if you do not need it. You can also use it to edit your script and remove the trailing carriage return on the command. (It will show up as a control-M at the end of the lines in the script.) Just remove them and save the script without them. The trailing carriage return character is why the folder ended up named "movies\r" (because you asked to be named that way)
Archived
This topic is now archived and is closed to further replies.