How to provide the input to terminal from batch file if terminal is waiting for an input

Viewed 33

I am running a cli command using bat script and running this bat script from python code. The cli command needs an input just after it is executed and stops and waits for the user input. How can I provide the input to the terminal from the script?

I tried this- echo xyz | <my_cli_command_that_requires_input_at_runtime> but it didn't work and raised an error- Missing input parameters: accountName. I think this issue is because my cli command takes 3-5 seconds and then accepts the user input. What could be the solution for this?

Note: This is for windows machine and using cmd to run the script

0 Answers
Related