X-number of file (by extension) --- Apply Color Label

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

Moderator: Mr_Noodle

Total Hazel Rookie...any suggestion would be great

If a folder contains more than some number of ZIP files (archive), Hazel's action should apply a color label to the folder.

Example folder structure
  1. Parent Dir -- contains many children
  2. Child Dir (subfolder) -- folder to get color label
  3. ZIP file(s)
Once a zip is expanded/uncompressed, Hazel moves it to above #2 - Child Dir, this step can be seen here:
https://www.dropbox.com/s/ms1c7f9v1yn6iwr/1.jpg?dl=0
Code: Select all
Extension = zip
Sort into subfolder with pattern: name...

Up to this point Hazel is magic!

A nondestructive visual on all folders containing many ZIP files seems like it should be easy.... but I'm lost.

Thanks for any suggestions.

Other than scripting, is this workflow possible given Hazel's attributes? It seemed like "sub-file" / folder count might have been an option, but this didn't work.( :x rookie)

desired match is X-number of file extensions in the folder -- then -- make the folder colorful
ginmn
 
Posts: 2
Joined: Mon Aug 30, 2021 11:56 pm

You might be able to use nested conditions for this though not sure how to do it based on the number of zip files. Just that there are zips files there or not. You might need to write a script for this particular logic.

EDIT: Actually, you might be able to do it by using something like "Date added is not among the X most recent". That would only match if there are at least X of those files there.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron