|What I need seems so simple yet I haven't been able to figure it out or find information on someone who wanted to do the same thing and came up with a solution:|
I need a batch file that when run, goes through each txt file in its directory and pulled text that is in a certain position within the file and renames the file with the original name of the file plus the data that is pulled from within the file. So it would work like this:
Say I have the following files in the folder:
The batch file, when run, would pull the string comprised of a specific location in the file (let's say Line 6 Column 35 to the end of that line, leaving out trailing spaces if that's not too much extra trickery) and rename that file as such:
123A - JOHN SMITH.txt
124A - MARY CRAZYBOTTOM.txt
123B - JACK N DABACHS.txt
234C - LIL MISS MUFFET.txt
So that the files are now named as shown above because the names were in the txt files on Line 6 starting at Column 35.
Then once it has renamed every txt file in the directory, the batch file terminates.
Seems simple right? But for some reason, I haven't been able to find out about how to do this...