Write/read count to txt file
- by Brian
Hi,
I need a batch file that writes the count number to a txt file.
Next time the batch file is run, it should read the current count number from the txt file and add 1 to count and save this new value in the txt file. (nothing else is in the txt file)
When count is 5 it should start from 1 again
Example:
Count.bat runs 1 time:
count.txt has no count so Count.bat saves the value 1 in count.txt
Count.bat is run 2 time:
Count.bat reads 1 from count.txt and saves the new value 2 to count.txt
When count.bat is run for the 6 time it should start over by saving the value 1 in count.txt
I think this just be easy to do, but I'am not use to batch commands
So hopefully someone here could help me.