Page 1 of 1

Windows: Simple post processing script to move movies to NAS

Posted: November 11th, 2012, 3:07 am
by jat80
Apologies if this has already been posted but I can't seem to find an existing script that will do this though others have asked.

I have SABnzbd running on a windows pc.
I have a synology DS108j with all my media content.
Sickbeard runs post processing through it's own provided script to move my TV shows to the dedicated show folders on my NAS.

What I would like is one for the movies I download to do the same thing - That is once all the processing has been done on the PC >THEN move the final movie file (renamed correctly) to the movies folder on my NAS.

If I just set up this up using the sorting and catagories the processing is done to the NAS which takes ages, I want all the processing to be done first just like the sickbeard script works then for it to move the final renamed file to the dedicated folder on my NAS.

I'm a total newbie when it comes to scripts so any help (in newbie speak) would be much appreciated. I've seen a couple of others wanting the same thing but no one has been able to write one or respond. I'm not sure if this is a hard script to write or not but i'll put it out there.

Thanks in advance!!

JT

Re: Windows: Simple post processing script to move movies to

Posted: November 12th, 2012, 12:31 am
by bmupton
It'd be something like:

Code: Select all

move /Y "%~1\*.*" "\\server\share\%3"
%3 is the "clean" name of the NZB

Use the sorting/renaming built in to SAB while the file downloads to a temporary location on a "fast" hard drive on your PC, then the script could just move everything over. Or, you could use ROBOCOPY if your machine is running Win7...it does a better job of copying folders from drive to drive than the regular copy command...

(Place that in a batch file, and put it in your SAB scripts folder, then select it as the script to use for whatever category you want for it to process)

Re: Windows: Simple post processing script to move movies to

Posted: November 20th, 2012, 5:10 am
by jat80
Thanks for the reply.

I've tried the above script and got this error back:

C:\Program Files\SABnzbd>move /Y "D:\SABnzbd\Downloads\Movies\Pixar Presto 2008 Short Film XviD\*.*" "\\V:\Movies\"Pixar Presto 2008 Short Film XviD""
The syntax of the command is incorrect.

The file type was an avi file.

Any help would be appreciated.

Thanks!

Re: Windows: Simple post processing script to move movies to

Posted: November 21st, 2012, 12:33 pm
by OfficerDoofy
Do you need only to move that files to another folder or you need extraction also?

EDiT : If you only need to move files save this as .bat file

YOU MUST USE IT AS POST-SCRIPT

Code: Select all

@ECHO OFF
set local

set path="Here Goes Complete Path for WinRAR Folder";%path%
set newname="%3"

c:
cd %1

REM RENAMiNG will rename all .avi files to NZB NAME

:RENAMiNG 

ren *.avi %newname%.avi & goto MOViNG

REM MOViNG will move all .avi files to V:\Movies folder (REMEMBER: It will move only AVI files, nothing more)

:MOViNG

move *.avi V:\Movies\ & goto DELETiNG

REM DELETiNG Will be remove folder where all .avi files were before MOViNG

:DELETiNG 

cd..

RD /S /Q "%1" & goto EOF

:EOF

endlocal