This question submitted by Robert Marino, Don Voss, Pat Melton and numerous others
As this question came in multiple times it was kind of a pleasant surprise for me. In this day of Windows and graphical user interfaces I thought it was interesting that users, like you,
wanted to know how to get a directory listing, either in a file or printed. Of course, there are programs you can use to print out a directory listing if you really want to. One such is Directory Printer
by Glenn Alcott Software. Another program is DirectoryPrint
by Computing Software. And to round it out, there's also Directory Report
by AMB Software. There are any number of programs
that can print out a directory listing. The common thread in the e-mails I received, however, was that they were asking if
you could print one, or save it to a file, if you didn't have a program. The answer: You bet! For those of you who have grown up with Windows, doing something from the command line might seem a little strange. People like me, however, use a command line often and I probably drop into DOS more than once a day. So, I'll lay this out a couple of different ways and you can pick the one that you like best, or that best suits the occasion. Then you can astound your friends and family, and perhaps best of all, if you're on a strange computer and need a directory listing you'll know how to get one. First click on Start
then type CMD
and press ENTER. You'll find yourself at that strange and mysterious place old-timers like me call the "DOS prompt." Don't be afraid! Now, the first thing to realize is that you must
know the name of the directory you want to print. So, let's say it is C:\Download. Now, when you drop to DOS you're most likely not
going to be in that directory. And, if you don't know DOS commands you'll have a hard time trying to navigate to the directory you want to print. So, at the DOS prompt just type the following and press ENTER:DIR C:\DOWNLOAD > DIRECTORY.TXT Let me explain what you've just done. The DIR command does a directory listing of the current directory OR the specified directory. What you may know as the greater-than sign is a redirection
sign in DOS. What does that mean? Well, it means that you're redirecting output to a place where it doesn't naturally go. In this case we've redirected the directory listing, which would normally go to your monitor, to a text file called DIRECTORY.TXT. If what you want is a file then at the DOS prompt you can type:EXIT (and press ENTER)and you can access the file from Windows. If you want to directly print the directory listing you can type the following at the DOS prompt and press ENTER:DIR C:\DOWNLOAD > PRNWhat this does is redirect the directory listing to your printer, which is known to your computer as PRN. If you want there are some other DOS commands that can clean-up your file or printout. For example:DIR C:\DOWNLOAD /B > PRNThe /B switch in the DOS Dir command strips out any heading information so you just get your list of files. You can also use it if you're redirecting the output to a file. If you're the curious sort and would like to find out what other switches the DIR command has, just type:DIR /?Press ENTER and you'll see a listing. In future installments of How To...
we'll talk about other DOS commands that you might find useful. I'd like to thank Robert Marino, Don Voss, Pat Melton and numerous others for submitting this question.
If you have a question on how to do something on the computer you can submit it via e-mail by clicking HERE
You will not receive a reply, but all topics will be considered.