1087.Batch file rename -- How to rename files to the first and last line of file contents?

How do I batch rename text-files to the first line in the content plus a minus sign plus the last line of content

Input Sample:

Cryin in the rain

A black cat moans When he's burning with the fever A stray dog howls When he's lonely in the night A woman goes crazy With the thought of retribution But, a man starts weeping When he's sick and tired of life

4. check filename preview of output file column, and make sure it is correct(Note: for long filename, it may not be displayed completely in the cell, you should move your mouse point on the filename to see detail) 5. click "File Rename", done.