'Q: How to trigger a Batch file from a Batch File? [duplicate]

Explanation:

I have a finished coded Batch-file. This Batch file is called X.bat and has 3 questions, which comes linear:

  1. “Press any key to continue” < It should automatically press anything to proceed
  2. “Do you like what you see? < The answer should automatic be “yes” or “Y”
  3. How would you rate this from 1-10?” < The answer should just be choice number “5”.

This is what I have so far:

echo off
x.bat

Mission:

I want to trigger the main batch-file with "Enter" -> "Y" -> "5" as events, so the .bat initiator, wont get the questions above.



Solution 1:[1]

If you want to start one batch file from another, you can use the call command:

https://ss64.com/nt/call.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Qwerty