Hazel "Best Practices" thread

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

Re: Hazel "Best Practices" thread Sat Feb 19, 2011 6:57 am • by bonis666
is the "hour" function in date last added, created etc. removed ? i can only choose from today week month and specific date
bonis666
 
Posts: 2
Joined: Sat Feb 19, 2011 6:50 am

Re: Hazel "Best Practices" thread Thu Feb 24, 2011 11:48 am • by Mr_Noodle
Do not post general questions here. Please repost this question in the support forum and I can help you there.
Mr_Noodle
Site Admin
 
Posts: 8219
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Giving a Folder Some Time Mon May 30, 2011 10:27 am • by Haydardk
gcoghill wrote:Giving a Folder Some Time

This might be obvious, but I had a kind of a 'eureka' moment when I realized by adding multiple "Date Added" conditions, I could control the processing a little better when desired.

To process only files created Today, but not process them immediately, add two "Date Added" rules:

• Date Added is Today
• Date Added is not in the last XX hours

Another method would be:

• Date Added is in the last 6 hours
• Date Added is not in the last 3 hours



HI ! any screen capture of this ?? would be so thankful ,, :D
Haydardk
 
Posts: 4
Joined: Sat May 28, 2011 2:31 am

Re: Giving a Folder Some Time Tue May 31, 2011 8:19 pm • by gcoghill
Haydardk wrote:
gcoghill wrote:Giving a Folder Some Time

This might be obvious, but I had a kind of a 'eureka' moment when I realized by adding multiple "Date Added" conditions, I could control the processing a little better when desired.

To process only files created Today, but not process them immediately, add two "Date Added" rules:

• Date Added is Today
• Date Added is not in the last XX hours

Another method would be:

• Date Added is in the last 6 hours
• Date Added is not in the last 3 hours



HI ! any screen capture of this ?? would be so thankful ,, :D


I think this is pretty self-explanatory.
gcoghill
 
Posts: 267
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

Re: Processing New Files Only Wed Apr 01, 2015 9:46 pm • by polocanada
gcoghill wrote:Processing New Files Only

"Date Last Matched is Today" ...... also helps if you are adding new rules to folders Hazel is already watching. This would be done if you do not want Hazel processing all the files retroactively.

I found this tip in many places on the forums here.


Edited:

I had an issue with getting a folder processed with 30,000 files. My rule is to create alias to new files in that folder. Every time I tried to run this I would freeze my system and then I had to figure out how to delete 20.000 aliases in terminal because Finder wouldn't delete them.

Based on this tip however I wasn't able to prevent Hazel to start re-doing the matching all over again on all files after I removed the restrictive condition.

What I think Hazel should include is a trigger/switched to explicitly allow to process already existing files - or - whether to mark existing files as already processed (matched) and only process files that will be added to the folder moving forward.

So the only solution for me seems to be adding second permanent restriction - " only match files added in last week ". That's not completely elegant but I guess only way to solve it.

Thanks.
polocanada
 
Posts: 7
Joined: Sun Mar 29, 2015 2:26 pm

Re: Processing New Files Only Wed Apr 01, 2015 11:19 pm • by polocanada
gcoghill wrote:
"Date Added is after Date Last Matched"
"Date Last Matched is This Week"


I find this combination produces the same results as:

"Date Added is after Date Last Matched"
"Date Added is This Week"
polocanada
 
Posts: 7
Joined: Sun Mar 29, 2015 2:26 pm

Can you share the steps for this rule?

Thanks

gcoghill wrote:Sorting files into monthly & yearly archives:

I have some rules on various folders set up to sort my files into date-based archives. For example, I have my Downloads folder set up to process any files left in the folder after a week to be sorted into a Monthly archive, and then after 6 weeks into a Yearly archive. After a week is up, Hazel will move any files added in say June to a folder which Hazel auto-created (based on a rule). The folder is named "2009-06". After the current month is over, the monthly folder is then moved into a Yearly archive folder, again auto-created by Hazel. In this case it would be created using the "Date Created" attribute.

One thing I have discovered for all such time-based archives or file/folder processing is that it's best to set as one of the rule conditions the following:

"Date Last Matched is not Today"

Since these files only need to be checked once a day to see if they fit the "1 week" or "not this month" criteria, there's no reason to have Hazel constantly analyzing these files. In my usage, I also add some color label "aging" to the files as they approach the 1 week mark—Added Today = Green, 3 Days = Red. Without the "Date Last Matched is not Today" rule, Hazel would constantly be matching these files.

I believe Hazel is smart enough to not keep adding the color label each time (I think I read this somewhere on the forums before). But I see constant Console messages about Hazel matching rules that only need to be checked once a day to see if they are "old enough" to have label colors change or move to an archive. No need to be checking these every time Hazel runs.
arjunurs
 
Posts: 1
Joined: Sun Jan 25, 2015 9:33 am

Re: Hazel "Best Practices" thread Sun Dec 17, 2017 11:07 pm • by gcoghill
I think Hazel got more powerful since I originally posted this. But here's how I would set it up today:

Rule:

[Date Added] [is not in the last] [2 weeks]

Result:

[Sort into subfolder] with pattern: (date added)

If you click on the (date added) lozenge, you can customize the date format. I use 2017-12 (YYYY-MM) format so it sorts nicely in the Finder.

This will create a subfolder in your Downloads folder, and each one will get auto-created as necessary for the proper month.
I'd suggest making a specific "Download archives" folder where these monthly archives get moved to, so you can later on run Hazel rules just on that folder and its contents (such as later on having all of the monthly archives get sorted into yearly folders).

My download archives folder is on an external drive so I can free up space on the boot drive.

Note that you'll need a separate rule to move those folders into the "Download archives" folder. My rule description just shows how to sort the files into dated subfolders.
gcoghill
 
Posts: 267
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

Previous

Return to Tips & Tricks - DO NOT POST QUESTIONS