Printing file directory

  • Thread starter Thread starter Werner Andreasen
  • Start date Start date
W

Werner Andreasen

Back in the days of DOS, we could use print screen to
make a "hard copy" of a directory of files. With windows,
and particularly with Windows XP Home edition, I can not
find a way to print a table of contents of a directory.
I would like to learn how to print what I may see in
Windows Explorer for easy reference, even at only one
screen at a time. How can I print a table of contents
for example of a CD-Rom that I burned to back up a group
of files on my HARD DRIVE? THANK YOU IN ADVANCE and HAVE
A NICE DAY.
 
In
Werner Andreasen said:
Back in the days of DOS, we could use print screen to
make a "hard copy" of a directory of files.


Back in the days of DOS, the PrintScrn key used to print the
screen. But in all versions of Windows, this works differently,
and the name of the key is now an anachronism.

To use the key, press it to capture an image of the entire
screen, or press alt-PrintScrn to capture an image of the active
window. Either one captures the image to the Windows clipboard.
Once it's in the clipboard you can paste (Ctrl-V) it into any
application that supports graphics (Windows Paint, other graphics
programs, even your favorite word processor). You can edit or add
to the image as you wish, then print it.

However, that's never been the best way to print directory
listings, especially long ones. See below.

With windows,
and particularly with Windows XP Home edition, I can not
find a way to print a table of contents of a directory.
I would like to learn how to print what I may see in
Windows Explorer for easy reference, even at only one
screen at a time. How can I print a table of contents
for example of a CD-Rom that I burned to back up a group
of files on my HARD DRIVE?


Here are three ways:

1. Go to a command prompt and issue the command

dir [drive:folder] > prn

If that doesn't work, your printer may not be connected to prn.
In that case issue this command instead:

dir [drive:folder] > c:\tempfilename (you can use any name and
put it in any folder you want)

Then open notepad, open tempfilename, and print it from there.


2. Go to
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q321379
and follow the instructions there.


3. Download and use any of the several freeware/shareware
utilities that can do this.
 
You could open a Command (DOS) window and issue the following:
dir /s > Listing.txt

This should record the current directory (and sub-directory) to the
"Listing.txt" file. Then, you open that file and print it.

A round-about way, but it works.
 
For the CD, you'd have to switch the drive (i.e. D:\ [Enter]) and then
type:

dir/s >C:\CD-Listing.txt
 
Go to the command prompt by using Start... Run....cmd.exe. Type dir/? to
see all the options for the dir command. You can choose the detail about
each file that you wish to obtain. You need to navigate in DOS to the parent
folder you want to copy. If it's on your hard drive, type CD\ to go to the
root of C: drive. Now type CD My Documents (example) if you wanted to copy
those filenames in My Documents. (CD = Change Directory). If you just
wished to make a typed copy put the piping command > prn. That should send
it to your printer. Example: after navigating to My Documents, type dir
/b /s > prn. That will copy the directory with option /b= bare bones
version, and option /s= include subdirectories, to your printer.

If you want an editable text file about the hard drive folder you're
interested in type dir /b /s > contents.txt. And it will create a file in
that folder named contents.txt with those options.

But because you want the contents of a CD drive (which DOS can't write to)
you have to send the file somewhere on your hard drive.
There are several ways to do that. You can either start from the folder you
want the contents.txt file in and "tell" the dir command to copy the D:
drive with dir D: /b >contents.txt. That will create the file list in
whatever folder you prompt shows but look at the D: drive to copy the
contents with "bare bones" info. The other method is to go to the area you
want to copy by typing D: and hit the enter key. That will move your
prompt to read D:\ . Now you can type dir /b /s > C:\Dcontents.txt. That
will copy the filenames on D: in "bare bones" view, including any
subdirectories and place it on your root C: drive and name it Dcontents.txt.
Now you can open that file in any text editor, edit it if you wish, and then
use the print command if you wish to print a copy of it.

An easier way is to just download Karen's Directory Printer at
http://www.karenware.com/powertools/ptdirprn.asp
Now you have an easy way to print or copy info of a folder/directory.
 
Back
Top