Main Area and Open Discussion > General Software Discussion
Rename text file based on contents
(1/1)
daddydave:
I have about 100 files I would like to rename based on the contents of the first line. For example, if I have a file File_23.txt and the first line is HG.ColorCodes.UndergroundCables, then I want the file to be renamed HG.ColorCodes.UndergroundCables.txt. When I Google this, what I find are ways to do this from a batch file, or from awk, or from VBScript. I can do that myself, but because of all the competition between file renamers, I would think there would be a way to do it from a GUI somehow. I am not seeing it in BRU or RenameMaster, though. BRU can read from a text file but you have to hardcode the new name for each file in that text file, so that is not what I want. Maybe there is something I missed?
EDIT: A cursory glance at the web site suggests Pfrank may be able to do it, I will let you know,
skwire:
This would be a piece of cake to do in AHK...do you still need something?
daddydave:
Not at this time...Pfrank does it but working through the rename steps, there seems to be more to it than meets the eye..
and ideally whatever renames it should probably be creating the wiki links and filtering out illegal characters in both the filename and in the wiki link so we are sure they are created by the same rules and therefore match..
And I think I am going in another direction now, but thanks for the offer.
Navigation
[0] Message Index
Go to full version