Page 1 of 1
Unpacking one download to multiple folders (Windows)
Posted: May 20th, 2011, 7:41 am
by Derko
Hi Everyone,
I recently started using SABnzbd and Sick Beard and love the combination. I love how it will automatically unpack to the correct folder on my server. However, my girlfriend does not. She would prefer it if I had it unpack into a different or "unwatched" folder so that she can easily see what is new. I know I can just change which directory the stuff gets unpacked to and then manually move it to it's final place after its been watched but that really takes the automation awesomness away from this combo. So, I was wondering if it was possible to have SABnzbd unpack copies of the same file to two different folders? For example:
I download file XYZ and then SABnzbd automatically processes it and unpacks one copy to
Server/Media/TV Show/Show/Season x/
and also another copy to
Server/Media/Unwatched/TV Show/Show/Season x/
So, is this even possible? Maybe with a script or modifying something in SABnzbd or Sick Beard? I'm also going to ask this over on the Sick Beard forums too.
Environment:
- SABnzbd version 0.6.1
- Windows 7 Ultimate x64
- Windows installer
- default skin
- not using ipv6
- server is running WHS v1 with PP3 installed
Re: Unpacking one download to multiple folders
Posted: May 20th, 2011, 8:28 am
by shypike
Well, you can write a little user script to do that

Something like:
@echo off
xcopy %1 d:\where\ever\you\want\%3\ /s/e
(The backslash after %3 is essential.)
More info:
http://wiki.sabnzbd.org/user-scripts
Re: Unpacking one download to multiple folders
Posted: May 20th, 2011, 8:39 am
by Derko
shypike wrote:
Well, you can write a little user script to do that

Something like:
@echo off
xcopy %1 d:\where\ever\you\want\%3\ /s/e
(The backslash after %3 is essential.)
More info:
http://wiki.sabnzbd.org/user-scripts
Thanks. Now how will that work if I'm already running sabToSickBeard.exe? Also, is there a page/website where I can learn how to properly make a script? I'm very new to this.
Re: Unpacking one download to multiple folders
Posted: May 20th, 2011, 8:55 am
by shypike
Just add the Sickbeard tool at the end
@echo off
xcopy %1 d:\where\ever\you\want\%3\ /s/e
c:\path\to\SickBeardScript.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
You'd miss the SickBeard functionality on the copy of course.
Re: Unpacking one download to multiple folders
Posted: May 20th, 2011, 9:21 am
by Derko
shypike wrote:
Just add the Sickbeard tool at the end
@echo off
xcopy %1 d:\where\ever\you\want\%3\ /s/e
c:\path\to\SickBeardScript.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
You'd miss the SickBeard functionality on the copy of course.
Would the Sick Beard functionality still work on the "original", meaning the copy I want to go into my archive folder (server/media/tv shows/tv show/season/)? What do the different numbers mean and the /s/e?
I tried making this as a windows .bat file and when I tested it, the file was just processed like it was before, nothing was copied. This is what I have in my sabToSickBeardwithCopytoUnwatched.bat file.
Code: Select all
@echo off
xcopy %1 \\ACER-H340-WHS\Media\Unwatched\TV Shows\%3\ /s/e
C:\Program Files (x86)\SABnzbd\scripts\sabToSickBeard.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
Any ideas where I went wrong? Also, I have set the .bat script file to run under the categories section in SABnzbd where I had previously set sabToSickBeard.exe. The folder path is still pointing to the same place on my server. Should that matter?
**Edit: I just downloaded a quick show to test it out and it returned an error when running the .bat file.
Invalid number of parameters
0 File(s) copied
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Re: Unpacking one download to multiple folders (Windows)
Posted: May 20th, 2011, 11:40 am
by Derko
Using some information I've found over in the Sick Beard forums (
http://sickbeard.com/forums/viewtopic.php?f=3&t=106) unfortunately it's a script for linux and I have no idea how to make it work in Windows. I've tried playing around with the config of sick beard by utilizing the extra_scripts parameter in the config.ini and having it point to CopyToUnwatched.bat. Which contains the code:
Code: Select all
@echo off
xcopy %1 \\ACER-H340-WHS\Media\Unwatched\TV Shows\%3\ /s/e
Using that I just tested it out on another file for my girlfriend and Sab and sick beard processed the file fine into the archive folder but then returned:
Absolute path to script: C:\Program Files (x86)\Sick Beard\CopyToUnwatched.bat
Script result: Invalid number of parameters
0 File(s) copied
So, any ideas as to what I am missing?
Re: Unpacking one download to multiple folders (Windows)
Posted: May 20th, 2011, 1:48 pm
by Derko
I figured it out.
In the sick beard config.ini I changed:
Code: Select all
extra_scripts = "CopyToUnwatched.bat"
and then created the bat file with:
Code: Select all
@echo off
xcopy %1 "\\ACER-H340-WHS\Media\Unwatched\TV Shows\" /Y
The shows now download, get processed like normal with sick beard but a copy is then also put into another "unwatched" folder.