I have given a bat file that I should run on development server which does some updates.
It has multiple commands and I would like to keep the results in txt file.
Should I add after each command >> result.txt or I can add it somewhere in the end of bat file and everything will be written in that?
You have four options:
Run the batch file at the command line like: myBat.bat >> outPut.txt
Script the above in another batch file and run that
Insert the >> after each command ( Note: the >> appends to file, while > overrides existing text output file)
Enclose all relevant lines in parentheses and script >> result.txt once at the end of the script
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With