Page 1 of 1

cannot for the life of me get this to work (crawling folders

PostPosted: Sun Apr 10, 2011 9:55 pm
by renegade
Trying out hazel.

Starting out simple. Just want a task to scan folders, if it finds a rar file to unarchive it.

Folders tree is simple. Single folder with all subfolders containing the file(s).

Using the crawling rules from the top of the forum, I added rules that are as follows:

Main Watched folder >

If all the following are met:

Kind is Folder
Extension is rar
date added is not in the last 5 minutes (just to test, will make it like 2 hours eventually)

Do the following:
run rules on folder contents
unarchive file

No matter what I do preview or run/it opens every single subdir (or lists in preview), but takes no action.

Only a few of them will actually have any rar files, so it should do something. Instead it doesnt do anything other than open all dirs.

Any advice?

Just an aside.

I set up a simple thing to merely just tag a .rar file blue using the rules from the top of the forum, it doesnt do anything either.

For reference:

Image

Re: cannot for the life of me get this to work (crawling fol

PostPosted: Sun Apr 10, 2011 10:49 pm
by sjk
renegade wrote:I set up a simple thing to merely just tag a .rar file blue using the rules from the top of the forum, it doesnt do anything either.

In the conditions of the window image you posted it's checking if "Color Label is Blue", not setting it with this action:

Image

Kind of confusing since the text description of your rules/actions that aren't working doesn't match the image.

Re: cannot for the life of me get this to work (crawling fol

PostPosted: Mon Apr 11, 2011 6:59 am
by renegade
Ummm, I set it up differently two different ways.

The first time which failed to do unarchive (rar).

The example I posted I found to be wrong since messing with it, I had later corrected it to tag it under Do the following, but it still has not worked.

Here is what I believe it should be in order to crawl the folder, and tag ones found with the rar extension blue, which does not work, either in preview or in running.

Image

Re: cannot for the life of me get this to work (crawling fol

PostPosted: Mon Apr 11, 2011 1:33 pm
by Mr_Noodle
I think you've guessed by now that your original rule was incorrect. You are matching both folders and rar files in the same rule, which can never be true (well, it could be but then the rar files wouldn't be actual rar files).

The rule you reposted just colors folders purple. I'm not sure what the other rule (if any) you have to match the rar files. You may want to post those as well as the preview.

Re: cannot for the life of me get this to work (crawling fol

PostPosted: Mon Apr 11, 2011 4:08 pm
by renegade
Yes, my apologies. I posted the wrong screenshot. doh.

While I have been playing with it for the last few hours, I had an epiphany.

I am able to get at least basic stuff done, and having figured that out, I should be able to accomplish what I need!

Thanks for the help!

Re: cannot for the life of me get this to work (crawling fol

PostPosted: Mon Apr 11, 2011 7:49 pm
by renegade
Well, almost there.

I can do everything I want with one exception.

I am able to now crawl the folders, look for a rar file, unarchive it, move it to where I want.

The problem is macpar deluxe will create its own folder during unrar, I move the contents out of it, but I want to delete the folder used for archiving. I cannot figure it out.

Basically work flow is this:

top level folder
subfolder that gets crawled for rar file, file found, call macpar
macpar unrars to a new folder, deletes rar archive files
hazel moves the unrar back to original subfolder.
end workflow.

I would like the last step to be that hazel moves the now empty archive folder to the trash, but cannot get it to do so. Any ideas?

Re: cannot for the life of me get this to work (crawling fol

PostPosted: Tue Apr 12, 2011 8:40 am
by renegade
Ok, made great progress.

I have hazel doing everything I need it do now.

I do have one issue however.

Folder structure is:

watched folder/subfolder1/subfolder2 <~~ this is not ALWAYS the case however.

If the structure is watched folder/subfolder1 everything works exactly as I would like it to.

When there is 2 subfolders Hazel does everything correct, except if the rar archive file is in subfolder 1, it extracts it to subfolder2

This is not the desired effect. I would like it to extract to subfolder1. I have set a rule that if the rar is at subfolder depth 1, but it still extract to the subfolder2 (as I assume that is the last folder hazel crawled). Also have tried setting a rule for the subfolder depth to be 1 on the rule to make hazel recurse.

I guess the question is, is there a way to have hazel stop crawling at subfolder1 depth?

Re: cannot for the life of me get this to work (crawling fol

PostPosted: Tue Apr 12, 2011 2:23 pm
by Mr_Noodle
Is there a reason why you aren't using Hazel's Unarchive action to do the unrar? It will unrar and throw away the original archive.

To make Hazel not go deeper than subfolder level 1, just add a condition to the rule that does "Run rules on folder contents" like "subfolder level is less than 2".

Re: cannot for the life of me get this to work (crawling fol

PostPosted: Tue Apr 12, 2011 2:45 pm
by renegade
Mr_Noodle wrote:Is there a reason why you aren't using Hazel's Unarchive action to do the unrar? It will unrar and throw away the original archive.

To make Hazel not go deeper than subfolder level 1, just add a condition to the rule that does "Run rules on folder contents" like "subfolder level is less than 2".


Yes because it doesnt work:

2011-04-11 19:41:31.293 hazelfolderwatch[30903] w08c.rar: Rule undo matched.
2011-04-11 19:41:31.293 hazelfolderwatch[30903] DEBUG: New rule signature. Executing actions.
Old signature: (null)
New Signature:{extension LIKE[cd] "rar"}:{(unarchive:,{
})}
2011-04-11 19:41:50.756 hazelfolderwatch[30903] Unsupported archive type: 6
2011-04-11 19:41:50.960 hazelfolderwatch[30903] [Error] Unarchive failed: Failed to unpack archive for /Users/Desktop/w08c.rar.


Got that for a couple different archives.

Re: cannot for the life of me get this to work (crawling fol

PostPosted: Tue Apr 12, 2011 4:13 pm
by Mr_Noodle
Could you send me one of those so I can check it out here? Want to see if a newer version of unrar will handle them. Just go to the "Info" pane and click "Contact Support" and attach the file there.