Need help with 'simple' compress and move new file

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Here you are- this is what I'm talking about.

You seem well versed in Hazel, so I'm sure you can see that I didn't implement your script here - but just a simple archive. I also did not include the time added part.

This will archive files that being with TESTING and are present only within the first level of subfolders in the monitored folder.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Hey. Well, but the problem here (if you get rid of day added) is that all files in that folder start with the same string...I only want to match the newest one.
jlepthien
 
Posts: 11
Joined: Mon Aug 27, 2012 12:31 pm

Then I would suggest using the "is within the most recent" feature.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Oh boy. It doesn't seem to be working...it always matches the new file but then wants to compress ALL the files in that particular folder...

Doesn't anyone have some kind of the same setup running?
jlepthien
 
Posts: 11
Joined: Mon Aug 27, 2012 12:31 pm

The only reason that it would be compressing the entire folder is if you're using "all subfiles".... Did you look at the example rule I posted above?
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Post your rule and then I can tell you what's going on.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Here is my rule in a basic fashion. It matches my folder 5 because it was changed in the last 24h. In that folder there is a file which was added today and the other files are pretty old. But still, Hazel matches all the files in folder 5 and wants to compress them all...

Thanks again m8.

https://dl.dropbox.com/u/5984/BBTV.hazelrules
jlepthien
 
Posts: 11
Joined: Mon Aug 27, 2012 12:31 pm

What this rule is doing is this:

Match folders which have subfiles that have been added today starting with "Test - S0". For those folders, go into them and apply this rule again. Then run the script against these matched folders.


If you want to compress the specific file that was added then this is off. You want one rule to go into subfolders (see the sticky article and use the rule as is - DO NOT MODIFY IT). Then create a separate rule to match files with date added today and name starting with "Test - S0" to run your script. Do not use any of the sub-file targets in any of the rules.
Mr_Noodle
Site Admin
 
Posts: 11551
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thanks! That does seem to do the trick. It's weird though that even there is only one file beeing added today, Hazel still sees three more files (not all) as being added today...

I guess I just let Hazel do its thing and wait until the next time a file is added automatically.

I'll keep you guys posted!
jlepthien
 
Posts: 11
Joined: Mon Aug 27, 2012 12:31 pm

Previous

Return to Support