How to make a cycle in bat which will check if there is more input data, for example for.bat 1 3 the cycle body should be executed twice with data 1 and then 3,

set i=1 for %%i%!='' do ( ....... %i% = %i% + 1; ) 

    1 answer 1

    For example:

     @echo off :cycle if .%1. == .. goto done REM требуемые команды с использованием %1 REM например echo Parameter = %1 shift goto cycle :done 
    • But how can I let him know that he should read% 2 - J Mas
    • something like %% i doesn't fit - J Mas
    • On how to go to% 2 and so on, read shift - nick_n_a