November 3, 201213 yr I'm looking for a way to simply move movies from one user share into another. I have one user share for "Movies to Edit", and once I am done editing the details and grabbing fanart, I move them into a different user share for XBMC to access. Up until now, I have been using telnet to move the files. I would love to have a batch file on my laptop or a script inside unRaid that would do this for me. Unfortunately, I am a programming idiot, and would only serve to screw this up badly. So, if anyone is feeling philanthropic, your help would be sublimely appreciated. Regards, Matt
November 3, 201213 yr If you want to use a bat you should check out robocopy. Ex: Robocopy x:/edit y:/xbmc /move /s Check http://ss64.com/nt/robocopy.html If your running unmenu you can add your script in it so you just press a button.
November 3, 201213 yr I'm looking for a way to simply move movies from one user share into another. I have one user share for "Movies to Edit", and once I am done editing the details and grabbing fanart, I move them into a different user share for XBMC to access. Up until now, I have been using telnet to move the files. I would love to have a batch file on my laptop or a script inside unRaid that would do this for me. Unfortunately, I am a programming idiot, and would only serve to screw this up badly. So, if anyone is feeling philanthropic, your help would be sublimely appreciated. Regards, Matt Example: Create a file on your flashdrive that contains the following: #!/bin/bash mv -b /mnt/cache/.Transmission/incomming/* /mnt/user/Incomming chown -R nobody /mnt/user/Incomming chgrp -R users /mnt/user/Incomming chmod -R 770 /mnt/user/Incomming Then add the following to your GO file: cp /boot/config/Empty_Flash /etc/cron.daily/Empty_Flash chmod +x /etc/cron.daily/Empty_Flash This will make sure that the files in /mnt/cache/.Transmission/incomming/ get moved to /mnt/user/Incomming on a daily basis. Does that help ? Should you want to run this hourly or weekly then use cron.hourly or cron.weekly instead.
November 4, 201213 yr Author Thank you guys!! Between Hellow's idea of making an unmenu user script and Helmonder's code, I put together exactly what I was after. You guys rock. I created a user script unmenu_user_script_Move_Movies inside of which I have #define USER_SCRIPT_LABEL Move to Movies #define USER_SCRIPT_DESCR This will move everything from the user share Movies to Edit to Movies #define USER_SCRIPT_RELOAD 10 #!/bin/bash chown -R nobody /mnt/user/Movies\ to\ Edit chgrp -R users /mnt/user/Movies\ to\ Edit chmod -R 770 /mnt/user/Movies\ to\ Edit mv -b /mnt/user/Movies\ to\ Edit/* /mnt/user/Movies You guys rock. Matt
Archived
This topic is now archived and is closed to further replies.