Unpacking one download to multiple folders (Windows)

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Derko
Newbie
Newbie
Posts: 5
Joined: May 20th, 2011, 7:29 am

Unpacking one download to multiple folders (Windows)

Post 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
Last edited by Derko on May 20th, 2011, 10:16 am, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Unpacking one download to multiple folders

Post 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
Derko
Newbie
Newbie
Posts: 5
Joined: May 20th, 2011, 7:29 am

Re: Unpacking one download to multiple folders

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Unpacking one download to multiple folders

Post 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.
Derko
Newbie
Newbie
Posts: 5
Joined: May 20th, 2011, 7:29 am

Re: Unpacking one download to multiple folders

Post 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.
Last edited by Derko on May 20th, 2011, 10:24 am, edited 1 time in total.
Derko
Newbie
Newbie
Posts: 5
Joined: May 20th, 2011, 7:29 am

Re: Unpacking one download to multiple folders (Windows)

Post 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?
Derko
Newbie
Newbie
Posts: 5
Joined: May 20th, 2011, 7:29 am

Re: Unpacking one download to multiple folders (Windows)

Post 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.
Post Reply