1.

Solve : 2 Handy Tips?

Answer»

These are for Windows 2000/XP/Vista

Unlike PAUSE, which accepts any key, SET /P will only accept the Enter key.

Code: [Select]SET /P =Press Enter to continue . . .
Group commands for redirection:

To log the result of several commands, a commonly used METHOD is

Code: [Select]command1 > logfile.log
command2 >> logfile.log
command3 >> logfile.log
In Windows NT4/2000/XP command grouping can be used to simplify the code:

Code: [Select](
command1
command2
command3
) > logfile.log
Thanks for the tips From my experience, you don't need to create the log file first.Quote from: Carbon Dudeoxide on May 15, 2008, 07:09:04 PM

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


Discussion

No Comment Found