Question

I have this code, and I want to make a delay in the for loop to measure one time and then make a delay and continue after that.

I tried:

timout / t 10/ nobreak 

As it is shown in the code, but it didn't work.

: @echo off

set Looping_number=10 or anything else

FOR /L %%A IN (1,1,%Looping_number%) DO call :doit %%A
goto :eof

:doit
set pad=00%1
set num=%pad:~-2%
@set var1=var1.exe
@set var2=C:\...\...\... .txt
@set output=C:\....\output\%num% 
Mkdir %output%
%var1%     %var2%     %Results%  
timeout / t 10 / nobreak
goto :eof 

But it says you can not delay?

How can I fix this problem?

Was it helpful?

Solution

You have extra spaces in your command:

timeout / t 10 / nobreak

You need to say:

timeout /t 10 /nobreak

OTHER TIPS

You can try the ping method:

ping -n 10 localhost > nul
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top