Counting in a FOR loop using Windows Batch script

前端 未结 3 1275
悲哀的现实
悲哀的现实 2020-11-28 06:14

Can anyone explain this? I am able to count in a loop using the Windows command prompt, using this method:

SET /A XCOUNT=0
:loop
SET /A XCOUNT+=1
echo %XCOU         


        
3条回答
  •  独厮守ぢ
    2020-11-28 06:49

    for a = 1 to 100 step 1

    Command line in Windows . Please use %%a if running in Batch file.

        for /L %a in (1,1,100) Do echo %a 
    

提交回复
热议问题