echo off type nul > D:\args_dump.txt echo args list: :LOOP set index=%1 if %index%! == ! goto END echo %index% echo %index% >> D:\args_dump.txt shift goto LOOP :END