Welcome to Media Center Master!
A powerful solution for mastering your digital media library.
Supporting Emby, Kodi/XBMC/OSMC, Plex, Windows Media Center, and more!

Home Download Gallery Wiki Issue Tracker Licensing Forums

   FAQ  •  Search •  Login •  Register     
It is currently October 17th, 2017, 7:22 am

All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: SabNZBd post-processing script for separating downloads
PostPosted: January 22nd, 2014, 12:54 pm 
Offline
Downloaded Clip

Joined: January 22nd, 2014, 10:31 am
Posts: 1
Don't forget to use double '%%' in the batch file. I get the error: ( was unexpected at this time I found the solution here
Here is what mine looks like:

@ECHO OFF
REM **
REM ** If SabNZBd says the processing completed successfully...
REM **
IF %%7 == 0 (
CD /D %%1
IF EXIST *.mkv (
REM **
REM ** ... and this folder has an MKV video, then we must have downloaded a movie or TV episode ...
REM **
CD \
ECHO This is a *VIDEO* and is being moved accordingly...
MOVE %%1 E:\Downloads\MediaMaster_Parser
EXIT 0
)

IF EXIST *.mp4 (
REM **
REM ** ... or this folder has an MP4 video, then we must have downloaded a movie or TV episode ...
REM **
CD \
ECHO This is a *VIDEO* and is being moved accordingly...
MOVE %%1 E:\DONE\MediaMaster_Parser
EXIT 0
)

IF EXIST *.avi (
REM **
REM ** ... or this folder has an AVI video, then we must have downloaded a movie or TV episode ...
REM **
CD \
ECHO This is a *VIDEO* and is being moved accordingly...
MOVE %%1 E:\DONE\MediaMaster_Parser
EXIT 0
)

IF EXIST *.ts (
REM **
REM ** ... or this folder has a ts video, then we must have downloaded a movie or TV episode ...
REM **
CD \
ECHO This is a *VIDEO* and is being moved accordingly...
MOVE %%1 E:\DONE\MediaMaster_Parser
EXIT 0
)

IF EXIST *.wmv (
REM **
REM ** ... or this folder has a wmv video, then we must have downloaded a movie or TV episode ...
REM **
CD \
ECHO This is a *VIDEO* and is being moved accordingly...
MOVE %%1 E:\DONE\MediaMaster_Parser
EXIT 0
)


REM **
REM ** ... otherwise ...
REM **
CD \
ECHO This is a miscellaneous download and is being moved accordingly...
MOVE %%1 E:\DONE\Other
EXIT 0
)

REM **
REM ** Tell SabNZBd that all is well with our script.
REM **
EXIT 0


 Profile  
 Post subject: Re: SabNZBd post-processing script for separating downloads
PostPosted: January 27th, 2014, 10:10 pm 
Offline
Developer/Owner
User avatar

Joined: May 1st, 2009, 10:12 am
Posts: 11315
Location: Meridian, ID, USA
Nice tip -- wonder why it works for me without it.

_________________
Peter Souza IV
stable version 2.16.11117.1299 / April 21st, 2017
Media Center Master on Facebook!


 Profile  
 Post subject: Re: SabNZBd post-processing script for separating downloads
PostPosted: December 13th, 2014, 1:39 am 
Offline
Flash Video

Joined: November 4th, 2013, 9:09 pm
Posts: 15
Okay. I am terrible with writing scripts etc, so I rely quite heavily on forums like here to assist.

I copied this script, but because I only use this script for movies, i don't need it to separate out everything. So I changed everything to go to the same folder. My Parser folder (ignore that is says sickbeard in the folder type, its just how it all ended up being named.

The first few times it worked great, it moved the movie folders (or file if it only downloaded a single file) to my parser folder. The script output in SAB read '2 files moved' or '7 files moved'.

For some reason, now it doesnt move any of the files, and the SAB Script says ran moviefile.bat (my script name) and the script log is empty.

I'm sure its probably a simple fix for someone that know what they're doing

Any help would be much appreciated.

Code:
@ECHO OFF
REM **
REM ** If SabNZBd says the processing completed successfully...
REM **
IF %%7 == 0 (
CD /D %%1
IF EXIST *.mkv (
REM **
REM ** ... and this folder has an MKV video, then we must have downloaded a movie or TV episode ...
REM **
CD \
ECHO This is a *VIDEO* and is being moved accordingly...
MOVE %%1 "C:\Users\User\Desktop\Louis\Downloads\Sickbeard\Parser"
EXIT 0
)

IF EXIST *.mp4 (
REM **
REM ** ... or this folder has an MP4 video, then we must have downloaded a movie or TV episode ...
REM **
CD \
ECHO This is a *VIDEO* and is being moved accordingly...
MOVE %%1 "C:\Users\User\Desktop\Louis\Downloads\Sickbeard\Parser"
EXIT 0
)

IF EXIST *.avi (
REM **
REM ** ... or this folder has an AVI video, then we must have downloaded a movie or TV episode ...
REM **
CD \
ECHO This is a *VIDEO* and is being moved accordingly...
MOVE %%1 "C:\Users\User\Desktop\Louis\Downloads\Sickbeard\Parser"
EXIT 0
)

IF EXIST *.ts (
REM **
REM ** ... or this folder has a ts video, then we must have downloaded a movie or TV episode ...
REM **
CD \
ECHO This is a *VIDEO* and is being moved accordingly...
MOVE %%1 "C:\Users\User\Desktop\Louis\Downloads\Sickbeard\Parser"
EXIT 0
)

IF EXIST *.wmv (
REM **
REM ** ... or this folder has a wmv video, then we must have downloaded a movie or TV episode ...
REM **
CD \
ECHO This is a *VIDEO* and is being moved accordingly...
MOVE %%1 "C:\Users\User\Desktop\Louis\Downloads\Sickbeard\Parser"
EXIT 0
)


REM **
REM ** ... otherwise ...
REM **
CD \
ECHO This is a miscellaneous download and is being moved accordingly...
MOVE %%1 "C:\Users\User\Desktop\Louis\Downloads\Sickbeard\SAB_OTHER"
EXIT 0
)

REM **
REM ** Tell SabNZBd that all is well with our script.
REM **
EXIT 0


The first


 Profile  
 Post subject: Re: SabNZBd post-processing script for separating downloads
PostPosted: September 11th, 2016, 2:36 pm 
Offline
Flash Video

Joined: February 6th, 2013, 6:16 am
Posts: 10
I just installed sabNZBd and am trying to get the post-processing script to work. I am receiving he following error upon the execution of the bat file almost as though something is wrong with the encoding...any suggestions?:

C:\Program Files (x86)\SABnzbd>IF %7 == 0 (
~á ~áCD /D %1
~á ~áIF EXIST *.mkv (
~á ~á~á ~áREM **
~á ~á~á ~áREM ** ... and this folder has an MKV video, then we must have downloaded a movie or TV episode ...
~á ~á~á ~áREM **
~á ~á~á ~áCD \
~á ~á~á ~áECHO This is a *VIDEO* and is being moved accordingly...
~á ~á~á ~áMOVE %1 "E:\MCM Download Parser\"
~á ~á~á ~áEXIT 0
~á ~á
)


 Profile  
 Post subject: Re: SabNZBd post-processing script for separating downloads
PostPosted: September 11th, 2016, 4:17 pm 
Offline
Flash Video

Joined: February 6th, 2013, 6:16 am
Posts: 10
...and the error is:

C:\Program Files (x86)\SABnzbd>~á ~á
'~á' is not recognized as an internal or external command,
operable program or batch file.


 Profile  
 Post subject: Re: SabNZBd post-processing script for separating downloads
PostPosted: September 18th, 2016, 7:47 am 
Offline
Flash Video

Joined: February 6th, 2013, 6:16 am
Posts: 10
Still not sure why the batch script was not executing correctly when others do...thinking maybe the code was powershell or some other scripting language not recognized by my system in the BAT format. Anyway, I found a script that would allow filebot to handle post processing in much the similar manner that the one I have for uTorrent does. All is working as expected...getting my media server more and more automated by the week. Thank you!


 Profile  
 Post subject: Re: SabNZBd post-processing script for separating downloads
PostPosted: December 4th, 2016, 2:06 pm 
Offline
Developer/Owner
User avatar

Joined: May 1st, 2009, 10:12 am
Posts: 11315
Location: Meridian, ID, USA
Those are TAB whitespace characters, so it looks like your computer did not handle the encoding well. Try changing the encoding in a text editor such as Notepad++. This is a standard batch file, not PowerShell or anything else.

_________________
Peter Souza IV
stable version 2.16.11117.1299 / April 21st, 2017
Media Center Master on Facebook!


 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group



Copyright © 2009-2017, Media Center Master, Inc. All rights reserved.