|Hi there, |
This is a working script that finds and replaces the text in a file in one single instance.
I need to be able to parse an entire directory of *.gdt and modify each file (like I've done below), but increment a number in the replaced field (as below)
every time it moves to the next file.
the beginning of the GDT text file (unmodified) is this:
"bo2-0" ( "material.gdf" )
Same file, modified, looks like this:
"somesortofincrementingcounter" ( "material.gdf" )
In place of "somesortofincrementingcounter", i'd like a number that gets incremented every time it moves to the next file in the directory. If it finds something like a "10" in the quotes, it would increment the next one to "11", the next to "12" and so on until it doesn't find any more files.
I will NOT be sending the modification to a new file as I have done below. (I did it so I didn't have to keep modifying it back)
Any help would be appreciated.
Thanks in advance.
--- code ---
(for /f "delims=" %%i in (%input_filename%) do (
message edited by RaGe