Good afternoon Ladies and Gentlemen,
I am requesting your help with the following for an XP pc:
I have a folder on my "C" drive called Test.
In this folder, I have a number of text files. eg. “Text.txt”, “Test.txt” and “Try.txt”.
Note that there can be any amount of text files in this folder.
I need to scan through each text file in this folder and copy a string of text within the file and then use this string to rename the file.
For example “Text.txt”, should be scanned through and the string to copy is “This is a test1”. NB That this string is located at a specific point in the text file and the end of it can be determined by “2 spaces”.
When this string is copied, then it should be used to rename the file, hence “Text.txt” should be renamed to “This is a test1.txt”.
See example below.
Contents of Text.txt are as follows:
Test This is a test-------
Testing: This is a test1
A scan of the file is done and “This is a test1” is copied.
This is then used to rename the file from “Text.txt” to “This is a test1.txt”.
We then complete this task for all files in the “Test” folder until all are renamed.
I hope I have explained it properly for you.
Thanks in advance for all your help. :)