How to pass file name of unrared media to batch?

Come up with a useful post-processing script? Share it here!
Post Reply
erictduckman
Newbie
Newbie
Posts: 1
Joined: June 27th, 2012, 12:27 pm

How to pass file name of unrared media to batch?

Post by erictduckman » September 17th, 2016, 12:25 pm

How do I get the file name of a media file from sabnzbd after it has been unrared so I can pass it to a batch file? For example, after completing a job, there is a file such as

Code: Select all

D:\Downloads\SABnzbd\complete\Some File S02E13 720p HDTV x264-AVS\some.file.s02e13.720p.hdtv.x264-avs.mkv
how do I get the full path and file name including extension into a windows batch file so that I can do things to that file, like rename it using phoenix-renamer? According to the help page at https://sabnzbd.org/wiki/scripts/post-p ... ng-scripts , that doesn't seem to be one of the parameters that can be passed. Moreover, a test script seemed to run before the par check and unrar, which would mean the media file wouldn't even exist when the script was run.

I am using sabnzbd version 1.1.0 [8abcf08] on Windows 10 Home 64 bit version 1607 build 14393.187

User avatar
safihre
Administrator
Administrator
Posts: 2219
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

Re: How to pass file name of unrared media to batch?

Post by safihre » September 17th, 2016, 12:39 pm

It shouldn't run before par and unrar, you sure about that?
Indeed only passes the folder, so you'll have to use that in your script to see what the output was. For example with python or cmd script you can list files with a specific extension in that directory and go from there. Or after you get the files in the folder, decide based on their sizes.

Post Reply