After Hazel runs, have it NOT change modification date?

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

Moderator: Mr_Noodle

I have Hazel doing a very nice action of adding certain wording into the comments section of a file, BUT it changes the modification date of the file. Is there a way to keep that from not happening? Otherwise it changes those dates to today.
ctphoto
 
Posts: 15
Joined: Thu Apr 09, 2015 2:23 pm

There's no way around that since the OS will update the time when you change that information. You can write a script to change the modification date back, though that would require you to also record what that date was beforehand.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Any script ideas on how to grab the time/date first then run Hazel then finish script?
ctphoto
 
Posts: 15
Joined: Thu Apr 09, 2015 2:23 pm

I suggest researching how to do shell/bash scripts. I'm guessing you want to use some combination of the "ls" and "touch" commands.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support