Computer Hope
Microsoft => Microsoft DOS => Topic started by: Dias de verano on May 15, 2008, 02:13:03 PM
-
These are for Windows 2000/XP/Vista
Unlike PAUSE, which accepts any key, SET /P will only accept the Enter key.
SET /P =Press Enter to continue . . .
Group commands for redirection:
To log the result of several commands, a commonly used method is
command1 > logfile.log
command2 >> logfile.log
command3 >> logfile.log
In Windows NT4/2000/XP command grouping can be used to simplify the code:
(
command1
command2
command3
) > logfile.log
-
Thanks for the tips ;D
-
From my experience, you don't need to create the log file first.
-
From my experience, you don't need to create the log file first.
Where did I say that you did? It depends (obviously) on what you want to do. If you want to create a new file each time, overwriting any other with the same name, then you would use the > symbol. If you want to create a file if it does not yet exist, OR add text to the end if it does already exist, you would use >>.
-
Nice tips