Changing date modified of *.eml files in finder

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

Moderator: Mr_Noodle

Hi,

This post is similar to the below, except I want to change the date modified of the file rather than rename the file.
viewtopic.php?f=4&t=12604

I am still using Contents > contain match to get the date the eml was received. I want to then pass the value to AppleScript which would run an embedded script something like:

do shell script "touch -t " & inputAttributes

I don't think I am using inputAttributes correctly. Any help would be appreciated.

Thanks!
topherlukec
 
Posts: 1
Joined: Sat Dec 30, 2023 10:35 pm

You can replace touch with the "echo" command to see what is being passed in. Make sure to turn on debug logging as described here: https://www.noodlesoft.com/kb/hazel-debug-mode/

A couple of issues though. One is that the file being matched is passed in as an alias. You probably should convert that to a POSIX path before sending it to the shell script. Secondly, not sure how passing in a list will be formatted. It might be better to grab the item out of the list before passing it to the inner script.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support