Hi,
I have a folder with hundreds of text files. Each text file contains a row with a date. I want to rename the text file with the date contained in this text file. Example: Suppose I have 2 textfiles, then one text file would contain a row like this:
DATE 1 February 2008
and the other would contain a row like this:
DATE 2 February 2008
The rows are not necessarily at the same position (e.g. it's not always the third row) All text files have in common that the date line starts with "Date". Right now the textfiles are named by numbers. How can I rename each text file by the date given within this file? In the above example, I want textfile 1 to be "1February2 008" and textfile 2 "2February2 008"
Thank you very much for your help!
Alexandra
I have a folder with hundreds of text files. Each text file contains a row with a date. I want to rename the text file with the date contained in this text file. Example: Suppose I have 2 textfiles, then one text file would contain a row like this:
DATE 1 February 2008
and the other would contain a row like this:
DATE 2 February 2008
The rows are not necessarily at the same position (e.g. it's not always the third row) All text files have in common that the date line starts with "Date". Right now the textfiles are named by numbers. How can I rename each text file by the date given within this file? In the above example, I want textfile 1 to be "1February2 008" and textfile 2 "2February2 008"
Thank you very much for your help!
Alexandra
Comment