Script running moves download into script folder

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
rustyboy
Newbie
Newbie
Posts: 3
Joined: August 6th, 2023, 5:31 pm

Script running moves download into script folder

Post by rustyboy »

My script ran fine when located under the SAB installation folder, then I saw a warning message in SAB saying that scripts should not be stored there because they will be overwritten upon each update of SAB (which was what was happening, with me having to copy the script from a backup each time SAB was updated). Now I have my script elsewhere and my downloads all end up in my [new] script folder. This might be my script, I am not sure, but it is only a couple of lines as I am not a script writer at all.

The purpose of the script is simply to keep the original download name of the folder in a text file within the folder as I always manually clean up file and folder names. If I had a movie that needed subtitles, I thought this would make chasing up the right subtitles easier. I very rarely need to chase subtitles now and could just turn off scripting, but I am curious as to why it is happening.

Base folder: c:\users\myname
Incomplete: Downloads\SAB\incomplete
Complete: Downloads\SAB\complete
Watched folder: Downloads
Scripts: Downloads\SAB\scripts

My script is the default in the Categories settings page where the base path is shown as

C:\Users\myname\Downloads\SAB\complete

The script itself is a few lines:

rem Made for SAB scripting
@echo off
echo %3 > %1\Version.txt
@echo on
echo Completed. Version.txt written.

That's it. I will probably remove the script as I rarely need the info but I need to know *why* this is happening just in case I understand scripting and want to do something in future (unlikely, but you never know, right?)
User avatar
safihre
Administrator
Administrator
Posts: 5678
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Script running moves download into script folder

Post by safihre »

So when you download a movie, the movie-folder ends up in "Downloads\SAB\complete"?
And where is Version.txt written?
Sounds like it's not your script but the setting of the Category maybe?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
rustyboy
Newbie
Newbie
Posts: 3
Joined: August 6th, 2023, 5:31 pm

Re: Script running moves download into script folder

Post by rustyboy »

So when you download a movie, the movie-folder ends up in "Downloads\SAB\complete"?
When my script was in C:\Program Files... it did. All I did was change the location of the script to my Downloads folder under \scripts (and adjusted the Category to reflect this). Now the movie ends up in Downloads\scripts\moviename_folder.
And where is Version.txt written?
It is always written to the moviename_folder. This file goes where it is supposed to all the time. Instead of movienname_folder being downloaded to Downloads\SAB\completed\ it is being downloaded to Downloads\SAB\scripts\. If I turn the script off, the download goes to the correct place (Downloads\SAB\completed\).
Sounds like it's not your script but the setting of the Category maybe?
A distinct possibilty, lol, :) but I have tried everything I could think of. I have probably done something silly in the Category settings but I can't see anything obvious. I have turned off the script because it's no big deal, but I am curious where I have messed up.

Thanks for the response.
R.
User avatar
safihre
Administrator
Administrator
Posts: 5678
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Script running moves download into script folder

Post by safihre »

Could you share a screenshot of your Categories Config page or the section "categories" from your sabnzbd.ini?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
rustyboy
Newbie
Newbie
Posts: 3
Joined: August 6th, 2023, 5:31 pm

Re: Script running moves download into script folder

Post by rustyboy »

Could you share a screenshot of your Categories Config page or the section "categories" from your sabnzbd.ini?
No need, it was my own misunderstanding of the Folder/Path text field. I had been using the path to my script in the Folder/Path field, I thought that it was the path to the script that was required. I just changed the field to blank and it works fine. Oops. Apologies.
User avatar
safihre
Administrator
Administrator
Posts: 5678
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Script running moves download into script folder

Post by safihre »

Great, I was indeed expecting that was the problem 😊
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply