Renaming files as first line of the content

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

Moderator: Mr_Noodle

Renaming files as first line of the content Mon Jul 12, 2021 7:25 am • by uglymusic
I have a folder full of text files named using dates and times. I'd like to rename them with something more meaningful, specifically the first line of the content. It would be even better if the new file name could be just the first 20 characters of the content.

Can anyone help me, please?
uglymusic
 
Posts: 2
Joined: Thu Jul 08, 2021 1:58 pm

Try setting up a match pattern with a custom text attribute. Have that attribute set up to match the first 20 characters. If you don't understand what I'm talking about here, then please refer to the manual where it's explained in more detail.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Fantastic! Thanks, Mr Noodle

It works perfectly for existing files and some new ones I've just generated.
uglymusic
 
Posts: 2
Joined: Thu Jul 08, 2021 1:58 pm


Return to Support