renaming a pdf based on its third line

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

Moderator: Mr_Noodle

renaming a pdf based on its third line Tue Nov 21, 2023 5:23 am • by samcg
Hello, I'm trying to automate renaming a few hundred pdfs. Is there a way to get hazel to rename a file based on its third line?

Thanks for your help,

Sam
samcg
 
Posts: 11
Joined: Mon Mar 06, 2023 6:23 am

Re: renaming a pdf based on its third line Tue Nov 21, 2023 12:48 pm • by Mr_Noodle
Is there no structure or pattern to the text otherwise? You could try a pattern like (anything)(anything)(•third line) where (•third line) matches (anything). Not sure if it will work but (anything) is not allowed to cross line boundaries so it will grab the first and second lines in the first two (anything) tokens, at least in theory.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: renaming a pdf based on its third line Thu Nov 23, 2023 7:18 am • by samcg
That's worked! Thanks for your help.
samcg
 
Posts: 11
Joined: Mon Mar 06, 2023 6:23 am


Return to Support