Redirecting output using the Windows XP command prompt

With XP you can redirect command input and output just like in linux.

Before XP you could not redirect STDERR.

Here is an example:

dir > file.txt 2>&1

The command above will send all output from 'dir' STDOUT and STDERR output to the file file.txt.

Last updated: 13/12/2005