Page 1 of 1

Edit file attributes from filename

PostPosted: Sat Dec 24, 2022 10:04 am
by eN0ch
I'm nowhere near geek enough to manage this, but I'll try to start at least. And maybe you can just point me to relevant topics in the manual.

I have a bunch of archived emails in PDF form in a certain folder. (Generated by an Email archiving app). The filenames begin with date/time of the original email in this format: 2020-11-21 04-58-19. (Followed by email subject). As the archives were created months / years after the emails, their date-time attributes are nothing close to those of the original emails.

What I'm hoping for is a Hazel rule that would read the date (and I suppose time, though that doesn't matter so much), and then edit the files' Finder date attributes to match the date in the filename. I'm guessing this might be a job for "match patterns"? I know zip about that, but am willing to learn. What part/s of the manual do I need to read?

Thanks.

Re: Edit file attributes from filename

PostPosted: Sun Dec 25, 2022 2:39 am
by eN0ch
Well I'm still interested in hearing the answer here for future reference for me or others. But I've found a more noob-friendly solution thanks to another app. It doesn't quite seem politic to say which app here. But I will if I'm asked. And/or you could PM me if interested.

Re: Edit file attributes from filename

PostPosted: Tue Dec 27, 2022 10:45 am
by Mr_Noodle
There's no built-in action to change the file times. For that part, you will need to use a script.