Reputation: 965
I'm using command "rmdir" inside a bat file for some automation job. But, this command asks for some user input like remove all directory recursively or not. So, user need to provide set yes or no by typing "y" or "n"
Can I set the user input inside my bat file??? So, that I don't have to enter the option manually each time I run that file.
NOTE: I have some other command which also needs user input. So I'm looking for a generalized solution.
Upvotes: 0
Views: 90
Reputation: 82247
A general solution is to echo the answer through a pipe, like:
echo Y | rmdir /s myDir
Upvotes: 1