stisev wrote:
1) Is there ANY way to prevent SAB from making folders of the NZB downloads?
2) I don't want to remove .NFO files from some downloads -- JUST anime. Is this possible and could you point to the solution (I am not a programmer

)
1) Not something I'd ever do so don't know. Suspect not.
2) Here is a naive (read: raw, untested, and undoubtedly flawed) batch file that you could try as the basis for your Anime category script:
Code: Select all
@echo off
for %%i in ("%1\*.avi" "%1\*.mkv" "%1\*.wmf") do move "%%i" "%1\.."
for %%i in ("%1\*.nfo" "%1\*.1" "%1\*.2") do del "%%i"
rmdir "%1"
This is expecting the complete destination directory in parameter 1 (%1), which Sabnzbd does when it calls the user script.
The script searches for some typical media files in the destination folder. You can add or subtract file types as necessary. Note the quotes around the path names to ensure that a path with spaces will work. For each file of the type specified, it will be moved to the parent of the destination folder, e.g. "D:\Anime\onepiece\onepiece.avi" will be moved to "D:\Anime\onepiece.avi".
Then, after any media files are moved, unwanted files are deleted. Again, add and subtract file types as required.
Finally, the nzb directory is removed. Note that this has an inherent safety mechanism. If there is still a file in the nzb directory, it would be something that was unexpected. The attempt to remove the directory will fail because it is not empty. You can examine the directory and determine if the leftover file is something you want or something else to add to the list of file types to be automatically moved or removed.
On the other hand, if you just want to nuke with prejudice the nzb folder, then this modification will be of interest:
Code: Select all
@echo off
for %%i in ("%1\*.avi" "%1\*.mkv" "%1\*.wmf") do move "%%i" "%1\.."
rmdir /s /q "%1"
I'd be real hesitant to do this, though. If you attempt to move a media file and that fails, then you would end up nuking your media file.
Anyway, something to get you started. Have fun!