Page 1 of 1

Organizing TV eps unarchiving/delete... almost there!

PostPosted: Mon Oct 01, 2012 10:55 pm
by punchbuggy
Hi there,

Here is my idea for using hazel

I have this directory setup

~/eps/tvshow1/season1/episode14/a.rar, a.r01, a.r02
~/eps/tvshow1/season2/episode15/x.rar, x.r01, x.r02

I want to do the following:

1) move my archives out of the the episode folder to its enclosing folder (ie. ~/eps/tvshow1/season1/episode14/a.rar to ~/eps/tvshow1/season1/a.rar)

2) unarchive in place

3) delete all other files

4) delete folders.

I believe I have 1 - 3 finished. here are my rules

1) Go into subfolders

If ALL of the following conditions are met for THE FILE OR FOLDER BEING MATCHED

KIND is FOLDER
then
Run rules on folder contents.

2) move archives

If ALL of the following conditions are met for THE FILE OR FOLDER BEING MATCHED

SUBFOLDER DEPTH is 3
KIND is archive
then
Move to folder ENCLOSING FOLDER

3) unarchive

If ALL of the following conditions are met for THE FILE OR FOLDER BEING MATCHED

SUBFOLDER DEPTH is 2
EXTENSION is rar
then
unarchive

4) delete all files left behind

If ALL of the following conditions are met for THE FILE OR FOLDER BEING MATCHED

SUBFOLDER DEPTH is GREATER THAN 2
then
MOVE to TRASH

5) delete empty folders (DOES NOT WORK :( )

If ALL of the following conditions are met for THE FILE OR FOLDER BEING MATCHED

KIND is FOLDER
Size is 0
then
MOVE to TRASH

I have no idea why the last one doesn't work eventhough that is exactly the same rules others have used...

Any helpful tips?

Re: Organizing TV eps unarchiving/delete... almost there!

PostPosted: Tue Oct 02, 2012 12:02 pm
by Mr_Noodle
The rule ordering matters. In this case, the rule to go into subfolders matches first so the other ones don't get a chance to run. In general, you want more specific rules up top. Try reordering and use the preview to check your work.

Re: Organizing TV eps unarchiving/delete... almost there!

PostPosted: Wed Oct 17, 2012 1:54 am
by punchbuggy
i have tried to re order and I still can't delete those empty folders.

Any suggestions?

Re: Organizing TV eps unarchiving/delete... almost there!

PostPosted: Wed Oct 17, 2012 1:06 pm
by a_freyer
Three suggestions.

(1) First, As Mr_Noodle suggested, what does the preview window say? Are these folders matching another rule, or are they not being matched at all? Check the window in order to debug.

(2) Try size < 1 byte

(3) Lastly, make sure that you're upgrading Hazel when an update is released. An earlier version of 3.0 had a bug in folder file size calculations (i.e. if you're still running that version, then this rule will fail)