To auto answer prompts in Windows batch script, try the following command.
"echo <answer > | < batch command>"
Ex: The del /P command option will prompt for user's confirmation before deleting the file.
"echo <
Ex: The del /P command option will prompt for user's confirmation before deleting the file.
So if you are using this option in your batch script, it requires manual input to proceed further.
To avoid this manual input, use the command "echo Y | del /P" in your batch script to answer the prompt.
To avoid this manual input, use the command "echo Y | del /P
Your website is really cool and this is a great inspiring article. Thank you so much.
ReplyDeletesee this
Please let me know, How to give multiple input.
ReplyDelete(echo input1 && echo input2) | your command
Deleteif we need inputs to be command specific.
Deletelets say if the command says "add first number" then it should echo "1" and if it asks for "add second number" then it should echo "2"
(echo input1 if "add first number" or echo input2 if "add second number") | your command
DeleteSame here... How DO i answer the userid/password you mentioned?
ReplyDeleteThanks!
ReplyDeleteI am getting space character after myminput in password field hence its not verifying. What to do?
ReplyDeleteThe writer has outdone himself this time. It is not at all enough; the website is also utmost perfect. I will never forget to visit your site again and again. salesflow.io
ReplyDelete