Get a better view of the Windows XP Tree command with Word

Using the Tree command to research the folders on your Windows XP hard disk can give you results that are too fast for your eye to catch. Greg Shultz explains how to use Word to view a Tree you can read in detail and at your own pace.

To find out how many folders there are on your Microsoft Windows XP hard disk, you can open a Command Prompt and use the Tree command. You'll get a very nice looking graphical tree structure showing all the folders on your hard disk. The only problem is that the display will scroll by your screen so fast and exceed the buffer size, so you'll never be able to see it.

Instead, try using the old MS-DOS pipe to funnel the output of the Tree command to a Rich Text Format (RTF) file. You can then import that RTF file into a specially formatted Word document and have the same graphical tree structure, showing all the folders on your hard disk, in an easy to read format. Here's how:

  1. Open a Command Prompt window.
  2. Use the CD \ command to access the root folder.
  3. Type Tree > Tree.rtf
  4. Close the Command Prompt window.
  5. Launch Word and open a new document.
  6. Go to File | Page Setup.
  7. In the Page Setup dialog box, choose the Landscape Orientation, and set the left and right margins to zero.
  8. Click OK and click the Ignore button in the margins warning dialog box.
  9. Go to Insert | File.
  10. In the Insert File dialog box, locate the Tree.rtf file and click the Insert button.
  11. In the File Conversion dialog box, select the MS-DOS option and click OK.

You can save the document and then scroll through the graphical tree structure showing all the folders on your hard disk.

This blog post is also available in the PDF format in a TechRepublic Download.

Note: This tip applies to both Windows XP Home and Windows XP Professional. Editor's note: The file can be viewed by any word processor or text editor with RTF capability.

Miss a tip?

Check out the Windows XP archive, and catch up on our most recent Windows XP tips.

Stay on top of the latest XP tips and tricks with our free Windows XP newsletter, delivered each Thursday. Automatically sign up today!


Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

Editor's Picks