Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Command prompt output.

Jun 30, 2007 1:59PM PDT

I know how to use the ">" command to direct the cmd output to a text file, but then the output does not appear on the screen. How do I, if possible, direct the output and at the same time, have it appears on screen ? Thanks.

christy

Discussion is locked

- Collapse -
Try this...
Jun 30, 2007 2:17PM PDT

Type in the word type followed by a space and the directory of the file, or just the filename if you are already at the destined directory. If possible the test of the file will then be displayed inline.

Hope this helps,
John

- Collapse -
Link only.
Jun 30, 2007 2:37PM PDT
- Collapse -
While Bob's suggestion will work admirably ...
Jul 1, 2007 7:20AM PDT

why bother when you can make use of XP's native ability to filter output through another command.

The following (simply an example) redirects the DIR command output into a file then processes the file through another command:

dir > c:\dir.txt | type c:\dir.txt

dir > c:\dir.txt | sort < c:\dir.txt

dir > c:\dir.txt | more < c:\dir.txt