I would like to know how can I checked the text of a file to retrieve only 3 characters/string from the first line and compare the string to find out if all the lines has the same string at the same position and I need to use this string to rename the file. i.e. ABC_20080610114500.oh
Attached file is 'Renaming_a_file.txt'
I need the program to read just the 3 characters starting from 2position to 5th. i.e. PABCDEF only ABC has to be derived; and the derived string 'ABC' should exist through out the file at the same position before using it to file name else it can't be renamed and should produce a log entry.
I hope this explains it clearly.
Number of downloads: 109