-1

I have a batch file (lets say "test.bat"). Now when we run this test.bat it asks for user inputs during it's execution, For ex. user credentials and then shows a menu. The user can choose an option from the menu by entering a value after which the script will ask him for a lot more product specific details.

Question: I need to call this test.bat inside another batch file and whenever test.bat requires user inputs my batch script should be able to provide a some inputs (a known sequence of menu options and inputs).

Is there anyway I can achieve this?

Mugen
  • 1,417
  • 5
  • 22
  • 40

1 Answers1

0

To call another batch file, I refer this link: Several ways to call a windows batch file from another one or from prompt. Which one in which case?

To get user inputs:

Echo off
set /p x=path name:
echo path is %x%
pause
Community
  • 1
  • 1
Julian
  • 1,056
  • 11
  • 14
  • Thanks for replying. I don't want the user to have to provide some input. I want the batch file to provide some values automatically. – Mugen Aug 26 '13 at 08:33
  • What do you mean exactly with automatically? – Julian Aug 26 '13 at 09:29
  • I meant that we need to provide input values to the batch script that we are calling. When we normally run that batch script (test.bat in my original post) then it does some stuff in the backend and then waits for user input. Then you need to enter some values and based on that it will perform more tasks. Repeat. – Mugen Aug 26 '13 at 10:24