I am trying to create a batch script which will take two input parameters from the user and pass those parameters to call one script which in turn should call another script. I am new to batch scripting. I have written the below code for that but the final script fails. It does not get the parameter correctly that was sent by the user.
The flow is as follow: userInput.bat calls mybat.bat, which calls startTask.bat.
Code for userInput.bat:
set /p userName="Enter the userName: "
echo %userName%
set /p dateofbirth="Enter the dateofbirth: "
echo %dateofbirth%
CALL mybat.bat %userName% %dateofbirth%
Code for mybat.bat:
CALL startTask.bat %1 "myHouseAddress" %2
CALL startTask.bat %1 "myOfficeAddress" %2
Code for startTask.bat:
java -classpath joda-time-1.6.jar com.mycode.somecode.KickOffTask %1 %2 %3