Run command/script before rules?

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

Moderator: Mr_Noodle

Run command/script before rules? Fri Dec 08, 2023 12:55 am • by Whig
Is there any way to run command or script before running rules?
I have some files which have wrong "rights?" so Hazel can't touch them but if I run short script or just one command to change those rights Hazel works perfectly.
Is there any way to run command/script before running rules or is my only solution to run that command/script example via cron?
Whig
 
Posts: 2
Joined: Fri Dec 08, 2023 12:52 am

Re: Run command/script before rules? Fri Dec 08, 2023 9:47 am • by Mr_Noodle
No way to do that in general but maybe you can have a rule at the top that tries and match a file with no color label, and run a script then which fixes it and adds a label? Not sure what kind of permissions issue you are having.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Run command/script before rules? Fri Dec 08, 2023 10:01 am • by Whig
Mr_Noodle wrote:No way to do that in general but maybe you can have a rule at the top that tries and match a file with no color label, and run a script then which fixes it and adds a label? Not sure what kind of permissions issue you are having.


I guess that I accidentally did pretty much that when I noticed that if I make rule "Passes shell script" and "embedded script" and just copy/pasted my command to that windows. It seems to work well enough now.
I noticed that I wrote wrong when I said "rights/permissions" because it seemed to be a problem with file attributes which I needed to change before moving files.
Thank you for your help and great software =)
Whig
 
Posts: 2
Joined: Fri Dec 08, 2023 12:52 am


Return to Support

cron