Code:
2>&1>NUL:
basically says "throw any and all output away".

Every program has two output streams, called Standard Output (STDOUT) and Standard Error (STDERR). These are usually internal file handles 1 and 2, so when a program wants to write an error message, it writes it to file handle 2. Normal messages are written to file handle 1. This is not done in scripting, but in higher (compiled) languages like 'c'.

So - when you run a command, you can redirect the output using ">" into a file or device.
 Code:
DIR > C:\Temp\FileList.txt
for example.. You can direct the error messages using "2>errors.txt".

In my example, "NUL:" (note - ONE "L"!) is a device that is kind of a black hole, or bottomless pit. Stuff goes in, but nothing comes out. ;\) It's useful to throw away unwanted or unneeded messages. The form "2>&1>" says "send the error messages (STDERR) to standard output, which is then redirected to (in this case) NUL: - causing all output to be discarded.

Note that the 3-character device names are "reserved" words, and include LPT: for the default printer, CON: for the console screen, and NUL: for the bit bucket. COM#: represent serial ports and LPT#: represent parallel ports. If you used "NULL:", it would not be recognized as a device and would create a file called "NULL", or would throw an error.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D