|
Answer» Alright... I am using batch files to keep track of a build number and use it in the name of another file. This number will be stored in a .TXT file. I need to know a way that I can take the number from the TEXT file and PUT it into a variable using something like "set".
Does anyone have an idea how to do this?
By the way, this number will need to be incremented every time that I use a certan batch file.This little snippet illustrates one way to accomplish this. Naturally you'll have to make changes to file names.
Code: [Select] echo off if not exist build.txt echo 0 > build.txt for /f %%a in (build.txt) do (set old=%%a) call set /a new=%old%+1 echo %new% > build.txt set old= set new=
Hope this HELPS. It works! It really works! Thank you so much! I'll have to remember this PLACE next time I have a question. Thank you, this helps a lot.
|