Page 1 of 1
Program files move up a level?
Posted: May 10th, 2010, 5:08 pm
by ijm
I have a strange problem. Sometimes I turn on my machine, and sabnzbd isn't running--and it's always because every file (but none of the folders) in "C:\Program Files (x86)\SABnzbd\" has been moved to "C:\Program Files (x86)\"!
To "fix" it, I move the files back to "...\SABnzbd\" and start it up. Everything works properly otherwise.
How do I stop this from happening??
TIA!
Version: 0.5.2
OS: Windows 7 x64
Install-type: Windows Installer
Skin: Plush
Firewall: Win7 firewall
IPV6?: No
Reproducible: Not on-demand...but it happens two or three times per week. (On average the machine restarts twice per day.)
Re: Program files move up a level?
Posted: May 11th, 2010, 2:27 am
by shypike
Cannot think of any cause for this.
Do you have any of your working folders (Config->Folders)
within SABnzbd's program folder?
Long shot: virus scanner?
Re: Program files move up a level?
Posted: May 12th, 2010, 4:10 pm
by ijm
No, no working folders are within SABnzbd's program folder.
My VS is nod32--but I can't think of why it would move files up a level, and leave them otherwise unchanged. Also, nod32 isn't giving any errors.
A good thought, though.
If this happened every time I turned the machine on it would be easier to diagnose--but it's only around 5-10% of the time.
Any other longshots I can check out?
Re: Program files move up a level?
Posted: May 13th, 2010, 3:48 am
by shypike
SABnzbd cannot do it by itself, since a running program cannot move its own files.
The only other thing I can think of is that the OS has gone haywire
and it things it has to move things at startup time (standard mechanism
used when updating running software).
Try removing SABnzbd completely (except data), reboot and re-install SABnzbd.
Re: Program files move up a level?
Posted: March 28th, 2011, 7:35 pm
by ijm
I hate to bring this up again, but I have still have the strange problem. And though I can't believe I never noticed this before, it IS sabnzbd that is moving the files.
Here's screenshot proof. It seems that when there's a problem finding the downloaded files, it moves the program files up a level instead. Very, very odd.

Re: Program files move up a level?
Posted: March 28th, 2011, 7:38 pm
by ijm
Oh, and most importantly, I'm using the following post-processing, which I realize is the culprit:
Code: Select all
@echo off
for /f "tokens=*" %%c in ('dir/b/a-d %1 ^| find /v /c "::"') do set filecount=%%c
if (%filecount% LEQ 1) (
cd /d %1
for /f "tokens=*" %%f in ('dir /a-d /b') do if not exist "..\%%f" (
echo Moving %%f...
move "%%f" ".."
)
cd ..
echo Deleting folder...
rd %1
) else (
echo To many files to move, aborting...
)
Re: Program files move up a level?
Posted: March 29th, 2011, 2:02 am
by shypike
It's the script?
What does it do wrong?
Re: Program files move up a level?
Posted: March 29th, 2011, 9:07 am
by ijm
Well, it's grabbing the files in the program directory and moving them up to Program Files. Most of the time the script does exactly what I want: when an extracted folder has only 1 file in it it moves the file up a lever and deletes the folder.
I'm going to change LEQ to EQU...I bet that'll do it.