Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
Computer Hope forum e-mail issues and down time
0 Members and 1 Guest are viewing this topic.
setlocalfor /f %%a in (countit) do set count=%%aset /a count=count+1echo %count% >countit
How about this:Code: [Select]setlocalfor /f %%a in (countit) do set count=%%aset /a count=count+1echo %count% >countitit saves the count in a file called countit and increments everytime its run
if not exist times.txt echo 0 > times.txtset /p times=<times.txtset /a times+=1echo %times% > times.txt
He's playing a game called IRL. Great graphics, *censored* gameplay.
Why use FOR, when if does the trick.Simple:Code: [Select]if not exist times.txt echo 0 > times.txtset /p times=<times.txtset /a times+=1echo %times% > times.txt
I suspect its 6 of one, but I didn't know you could do that with set /p. Cool tip.Thx\\uSlackr