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; ) 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; ) For example:
@echo off :cycle if .%1. == .. goto done REM требуемые команды с использованием %1 REM например echo Parameter = %1 shift goto cycle :done shift - nick_n_aSource: https://ru.stackoverflow.com/questions/598495/
All Articles