How can I print a list of the contents of any folder?

Article contributed by Terry Farrell and Beth Melton

Sometimes you may want to print a list of the files you see in the File, Open dialog or a map of the files in Windows Explorer. Frustratingly, Microsoft didn't add this simple facility.

Using the Command Window

The basic technique is: open a command window, obtain the directory listing you want, then export it to a text file.  Here's how:

  1. Go to your Start menu and choose the Run item
  2. In the Run prompt, type "cmd" and hit Enter
  3. Type "cd " and a space but do NOT hit Enter
  4. Now, in Windows Explorer (the yellow one, not Internet Explorer) or in My Computer, navigate to the folder you want.
  5. Drag that folder into the CMD window.  Now hit Enter.  Don't worry, the folder won't go anywhere: this is just an easy way of changing to the directory you want without having to type it!)
  6. Now type "Dir *.*" and hit Enter.  This will list the content of the directory for you.
  7. At this point, you can adjust the output of the Dir command so that what you see listed is what you want.  For example, the "/w" switch changes the columns around to make it easier to use the result later.
  8. Now we "pipe" the output to a text file.  For example, type
    "Dir *.doc /w | listing.txt" to list only the documents in the folder.  Note the vertical bar '|' symbol.  That's the "pipe" command that pipes the output of the first command to the input of the second command (create a text file named 'listing.txt').
  9. In Windows Explorer, refresh your display.  You will find that a file named "listing.txt" has appeared in the directory.
  10. Open the file in Word and remove the columns you do not want.  To do this:
  11. Set the font to Courier New to lay things out in columns
  12. Hold down your Alt key as you drag across a column.  This selects a vertical block of text.
  13. Press "Del" to delete the column you have selected.  Rinse and repeat...

This sounds involved, but it's actually a lot easier to do than it is to describe.  Practice a couple of times so you can do it quickly whenever you want it.

If you have Outlook

If you have Microsoft Outlook, MS have given you a back door for printing any file list.

1.

Open Outlook and make sure that the Outlook Bar is active (View, Outlook Bar)

2.

Click on Other Shortcuts at the bottom of the Outlook Bar. By default, it will have icons for My Computer, My Documents and Favourites

3.

Select My Documents. This will present you with a Details list of your My Documents folder. Using the View, Current View menu you can completely customise this view to show exactly what you want, adjust the default column widths until the printable display is perfect for your requirement. You can even sort the display into File Types.

4.

Use File, Print to print it.

5.

You can add shortcuts directly to any folder (on Local or Network drives) by dragging the item from the Folder List to the Outlook Bar.

6.

You can also customize the view using the Field Chooser:

a)

Right-click a column heading and select Field Chooser Change the display to All File Fields and then drag/drop the fields you want to see. To remove a field just drag it off or right-click and select Remove this field.

b)

You can add/remove various fields from the View such as Application, (this will display specific Word version), File Properties; Printed, Author, Words, Lines, Pages, User Defined Fields, Hyperlink Base, Template, etc.

c)

Under the View menu you can use the Filter command to further customize your view.

d)

A quick way to save a view you modified is to switch to another view and when prompted select Save current settings as a new view.

7.

If you want to select just a particular type of file to list and print, use View, Current View and check By File Type. You can then expand the view for the file type required (and collapse all others), Highlight the expanded selections and choose File, Print, Only Selected Rows,

See also: How to get the names of all the folders in the folder tree, starting from a specified folder.