Page 1 of 1

Renaming files as first line of the content

PostPosted: 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?

Re: Renaming files as first line of the content

PostPosted: Mon Jul 12, 2021 9:11 am
by Mr_Noodle
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.

Re: Renaming files as first line of the content

PostPosted: Mon Jul 12, 2021 11:55 am
by uglymusic
Fantastic! Thanks, Mr Noodle

It works perfectly for existing files and some new ones I've just generated.