assume a textfile called 'params.txt' with following contents 1,2,3,4,5,6 2,3,4,5,6,7 3,4,5,6,7,8 hostname,this,is,the,success,line In the above, change 'hostname' to the name of the computer your are running on right now. Now create a batch with the following: @echo off setlocal for /f "tokens=1-6 delims=," %%a in (params.txt) do if {%%a}=={%computername%} call :DOIT %%b %%c %%d %%e %%f echo All done! endlocal goto :eof :DOIT echo %1 %2 %3 %4 %5 goto :eof