rename files with found date into PDF

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

Moderator: Mr_Noodle

rename files with found date into PDF Sat Dec 12, 2020 8:38 am • by Soc007
Hello,

I search PDFs for the first date found in the file.

With contain mached (Custom Date) and "automatically detect date format" an existing date is not always found.
With an IF query (any condition) I query CustomDate (automatic) or a second CustomDate (its own search format).
Then I set either the Date variable (automatic date search) or the ManDate variable (manual date format).

How can I append the correct variable (Date or ManDate) to the file name on the filename?
Soc007
 
Posts: 7
Joined: Sat Nov 28, 2020 3:31 pm

Re: rename files with found date into PDF Sat Dec 12, 2020 10:29 am • by EdBurke
If I've understood you correctly, you have matched the date within the document...right? If so, something like Rename with pattern File Name - *Date Match.pdf should work for you.
EdBurke
 
Posts: 28
Joined: Wed Apr 18, 2012 6:58 am

Re: rename files with found date into PDF Sat Dec 12, 2020 12:14 pm • by Soc007
Yes, so far that's true. The only problem is that the automatic date recognition doesn't always work.
some PDFs have a date in the text but are still not recognized.
If I define the date format myself (e.g. dd.mm.yyyy), then the date is found correctly.
Only the automatic recognition of a date format is probably not always possible.
Soc007
 
Posts: 7
Joined: Sat Nov 28, 2020 3:31 pm

Re: rename files with found date into PDF Sat Dec 12, 2020 12:47 pm • by Soc007
I found a solution. See that in hazel docu under Reusing Custom Attributes in Condition Patterns.
Soc007
 
Posts: 7
Joined: Sat Nov 28, 2020 3:31 pm


Return to Support