1.

Solve : Counting with variables?

Answer»

Is there anyway of adding in DOS using variables,
ie;
COUNT=count + 1

I'm using DOS version with Win98se.

Thanks for any help given.Code: [Select]set /a count=%count% + 1
Cheers,
[GLB]cs[/glb]Oh, bad luck ... does only work on W2K and WXP

Cheers,[glb]cs[/glb]Yes, I noticed. :-/

Thanks for the effort.

Anyone else ? Use the following:
Code: [Select]@ Echo Off
SET T1=%temp%\TEMP.BAT
SET T2=%temp%\Set.BAT
SET T3=%temp%\Count.BAT
Echo.! > %T3%

:LOOP

rem <insert your code here>

echo e100'SET %%1='> %T1%
for %%? in (rcx 7 n%T2% w q) do echo %%?>> %T1%
DEBUG < %T1% > nul
type nul > %T1%
find /c "!" < %T3% >> %T2%
Call %T2% num
Echo Loop %num%
Echo.! >> %T3%
If "%1" == "%num%" goto Exit
Goto Loop

:Exit
DEL %T1%
del %T2%
del %T3%

'File.bat 100' will make it loop 100 times.Hey, Cool! thanks.



Discussion

No Comment Found