Tech Tips / Windows NT / Tools and Tasks

Redirecting the command shell's standard output

Windodows NT command shell commands and most command console applications (such as those found in the Windows NT Server Resource Kit) output ANSI character data that the command shell displays as text on your screen. This text output is also known as standard output, and you can capture it to files, pipe it as standard input to other commands, or assign its value to a variable.

To capture output to a file, you can use the redirection symbols [>] or [>>]. The single greater than symbol captures the output to the specified file while overwriting the existing file's contents. The double greater than symbol captures the output and appends the data to the target file's contents. For example, the command DIR > dir.txt captures the DIR command's output to the text file Dir.txt and overwrites any preexisting data that the file contained.

Contact Us | Authors | Subject Index | Directory | RSS Feeds

Copyright ©2006 Setup32.com