I have one master batch file
Master.bat which called 3 files
first.bat
,second.bat
,third.bat
Now I want to pass parameters to Master.bat
and based on parameter want to execute internal statements
for example
If I passed Master.bat first
then Master.bat
should execute only call first.bat
not others.
Master.bat
call "first.bat"
call "second.bat"
call "third.bat"
How can I achieve this? If multiple parameters are also passed?How can I loop though?
answer I accepted works fine for me but
When I pass extra other parameters it fails :( like below
Master.bat first,second parameter1 parameter2
now When I try to execute above it only exceutes first.bat
Code for Master.bat
is
@echo off
:LOOP
if "%1"=="" goto ENDLOOP
call "%1" %3 %2
shift
goto LOOP
:ENDLOOP
%1 should take
first,second
%2 should takeparameter1
%2 should takeparameter2