Some commands have a /b or /n switch to tell them they are being run from a batch file (and to suppress prompts.)
Another way is to have input and output redirection. But the input file must have all of the correct responses in the correct order (and the batch file can go horribly wrong if an unexpected error prompt appears. Put the redirection in the command line that starts the batch file, or in the batch file line which starts the command.
< redirects input, > redirects output, >> redirects error messages. There must be no space between the redirection sysmbol and the file.
You are right, I was thinking of the OS-9 similar redirections. DOS uses >> for append.
In my example, dothis.bat is the batch file.
promansr.txt is a text file full of the expected responses to prompts, one response per line.
e.g. (I put the question over to the right. it is not part of the file)
y (are you sure?)
n (send to printer?)
(Press ENTER to continue.)
y (Replace the file? y/n/c=cancel)
digester.txt takes all of the output and "digests" it. You need to remove the file between runs of the batch file. You can do this by calling another batch file which deletes the file (and the two batch files could delete each other's files).
this command as the first line of a batch file also removes a lot of queries.
Hi I have a problem with my windows xp pc sp3 after it finishes loading windows xp screen just as it's about to load login screen pc constantly restarts itself
I did have cpu cooling issues so bought new cooler and rear fan also put new thermal paste in 10 ...
I have a problem with OneDrive. I have a junction which points to another folder on the same drive as the junction; the problem is the junction is taking up space. I want to remove the junction but keep the original folder location but yet still have OneDrive sync the ...
Hi. Im having issues with my laptop lately, I kept getting BSOD with error PNP_DETECTED_FATAL_ERROR. I tried uninstalling softwares which I had previously installed but I still kept getting it so i did a reinstall of windows instead and now im having driver issues(with ...