Author Topic: Empty Folder not deleted  (Read 4525 times)

Offline DrStrange

  • Contributor
  • ***
  • Posts: 1
Empty Folder not deleted
« on: April 22, 2010, 12:57:28 am »
Hi.
I have the following options set:
Create subfolders based on NZB/root node name;
Delete NZB file after importing;
Delete par2 files;
AutoUnrar;
Unrar to a different folder -the default download folder is a folder in my C: drive. I have told Alt.Binz to unrar to my F: hard disk;
Delete archives after successful unraring;
Delete *.sfv after successful unraring;
Delete *.md5 after successful unraring;
Delete empty folder after successful unraring;
Move to unrar folder : *.nfo, *.jpg, *.srr;
Delete rars after successful extracting.

So the NZB subfolder in the default download folder in C: is empty but alt.binz doesn't delete it.
Why does it not?
« Last Edit: April 22, 2010, 12:59:31 am by DrStrange »

Offline onzin8

  • Contributor
  • ***
  • Posts: 8
Re: Empty Folder not deleted
« Reply #1 on: September 13, 2011, 06:13:57 pm »
Hi,

Sometimes empty folders are deleted and sometimes not. I found at least one explanation:

I've set par2 files larger than 20000000 bytes as paused on import. This means there are still some (smaller) pars left to download. The par2 files are downloaded last automatically (because they are usually at the end of the queue). However, when all .rar files have been downloaded, the extraction process begins. On fast computers/slow connections the unrar process is completed before the last .par2 file is downloaded.

This means that after successfully extracting and cleaning up, there are still some .par2 files downloaded. Those are removed afterwards as well, but the empty folder remains. (I've set to download each .nzb to a folder based on the .nzb name). I think the cleanup process is confused because of the par2 files still being put in the folder after already having successfully unrar-ed everything.

If I test the same .nzb, but move the .par2 files to the front of the queue, the empty folder is deleted.
If I test the same .nzb, but immediately pause the .par2 files, the empty folder is deleted.
If I test the same .nzb, but immediately delete the .par2 files, the empty folder is deleted.

By the way, the files are 100%, so no par repair is needed in my test-case.

@RDL: I hope this helps you debugging! I've kept the NZB file I used for debugging. If you need it, please let me know how I can get it to you.

I use 0.39.2
« Last Edit: September 13, 2011, 06:23:29 pm by onzin8 »

Offline davidq666

  • Contributor
  • ***
  • Posts: 1302
  • Watashi Wa Ero Desu!
Re: Empty Folder not deleted
« Reply #2 on: September 13, 2011, 08:58:41 pm »
Hi,

Sometimes empty folders are deleted and sometimes not. I found at least one explanation:

I've set par2 files larger than 20000000 bytes as paused on import. This means there are still some (smaller) pars left to download. The par2 files are downloaded last automatically (because they are usually at the end of the queue). However, when all .rar files have been downloaded, the extraction process begins. On fast computers/slow connections the unrar process is completed before the last .par2 file is downloaded.

This means that after successfully extracting and cleaning up, there are still some .par2 files downloaded. Those are removed afterwards as well, but the empty folder remains. (I've set to download each .nzb to a folder based on the .nzb name). I think the cleanup process is confused because of the par2 files still being put in the folder after already having successfully unrar-ed everything.

If I test the same .nzb, but move the .par2 files to the front of the queue, the empty folder is deleted.
If I test the same .nzb, but immediately pause the .par2 files, the empty folder is deleted.
If I test the same .nzb, but immediately delete the .par2 files, the empty folder is deleted.

By the way, the files are 100%, so no par repair is needed in my test-case.

@RDL: I hope this helps you debugging! I've kept the NZB file I used for debugging. If you need it, please let me know how I can get it to you.

I use 0.39.2

just out of curiousity why do you donwload par files you don't need and that get deleted right away? You can set altbinz up to autopause those on import, see settings->nzb#2 pause par recovery files if size is larger the xx bytes.

Offline onzin8

  • Contributor
  • ***
  • Posts: 8
Re: Empty Folder not deleted
« Reply #3 on: September 14, 2011, 07:35:09 am »
just out of curiousity why do you donwload par files you don't need and that get deleted right away? You can set altbinz up to autopause those on import, see settings->nzb#2 pause par recovery files if size is larger the xx bytes.

I've set that as you can read in my post. However, I don't know beforehand if the files are 100% or not. When the files are corrupt and I haven't downloaded any pars, repair will fail. You could then download the pars
separately, but I don't want to have to pay attention to that. I just start downloads and sometime later I come back and I want it to be finished (complete or not complete). I don't care the pars are downloaded but not needed because my connection is fast enough (40mbit).

Also the queue is cleaned automatically. So when I return the queue with the needed pars is gone. I could disable auto-cleanup of the queue, but I like it when everything is automated and I don't want to clean up every now and then. That's one of the reasons I use alt.binz.

---

A nice feature would be that the download-queue is not cleaned until successful extraction. If it is detected that pars are needed, the paused pars will be downloaded anyway, and then the files can be repaired. That way pars can always be paused in the queue and are downloaded only when necessary.

Offline onzin8

  • Contributor
  • ***
  • Posts: 8
Re: Empty Folder not deleted
« Reply #4 on: September 14, 2011, 07:36:48 am »
[Internetconnection was flaky at work. Sorry for the double post]

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: Empty Folder not deleted
« Reply #5 on: September 14, 2011, 08:32:35 am »
A nice feature would be that the download-queue is not cleaned until successful extraction. If it is detected that pars are needed, the paused pars will be downloaded anyway, and then the files can be repaired. That way pars can always be paused in the queue and are downloaded only when necessary.


Yes, this is in fact how Alt.Binz already does it with auto-unpausing.

Offline onzin8

  • Contributor
  • ***
  • Posts: 8
Re: Empty Folder not deleted
« Reply #6 on: September 14, 2011, 03:55:48 pm »
A nice feature would be that the download-queue is not cleaned until successful extraction. If it is detected that pars are needed, the paused pars will be downloaded anyway, and then the files can be repaired. That way pars can always be paused in the queue and are downloaded only when necessary.

Yes, this is in fact how Alt.Binz already does it with auto-unpausing.

Oh... sorry about that. I never noticed it works that way. Tested it today. Indeed when most pars are imported paused, they auto-unpause when needed. Great!!! Empty folders are removed also in that case. Guess my "problems" are solved.

Offline onzin8

  • Contributor
  • ***
  • Posts: 8
Re: Empty Folder not deleted
« Reply #7 on: September 14, 2011, 04:23:33 pm »
I would like to point out however, that although the "issue" is resolved by importing all par2 (except for small par2) as paused, the combination of settings I used apparently DOES prevent empty folders from being deleted. This might thus be the reason some other users report the problem of empty folders not being removed.

So, if people complain, they should read this thread and test if the things mentioned here solve their problem.