How best to rename many text files with 1st line of text?

Hi Folks,
I have a bunch of text files in a folder that I would like to modify.
Currently, the filename is not useful.
I would like to be able to grab the first line of each text file and use that as the new filename title and rename each file with the 1st line.
I am curious how best to batch process all items in the folder with Hazel?
Thanks Dave
I have a bunch of text files in a folder that I would like to modify.
Currently, the filename is not useful.
I would like to be able to grab the first line of each text file and use that as the new filename title and rename each file with the 1st line.
I am curious how best to batch process all items in the folder with Hazel?
Thanks Dave