I
COMMAND THEE TO PRINT A DIRECTORY--PART 3 OF 3
In a previous tip, we
showed you how to turn a directory listing into a *.txt file (that you can
manipulate and print from your word processor: Assuming you want to print a
listing of drive C by creating the text file C:\My Documents\DirListing.txt,
open an MS-DOS Prompt window, type
dir C:\ /S >
C:\DirListing.txt
and press Enter. Then, in
our last tip, we showed you how to send a directory listing directly to your
printer: Follow the steps above, but use the following command line.
dir C:\ /S > prn
(Tip: To print a listing of
only one folder, as opposed to an entire drive, type its path after the C:\ in
the above command line.)
Now let's look at a couple
of switches to help you customize your listing. (By the way, the /S switch in
the above commands instructs DOS to search all folders and sub-folders.)
Want to print a listing of
all the directories and subdirectories on the specified drive, without
including all the files inside them? Use the /AD switch as follows:
dir C:\ /AD/S > prn
To print a detailed listing
(for example, including long filenames) of all the files in a specified folder,
without including that folder's sub-directories, use the /V switch as follows:
dir C:\{path to directory}
/V > prn
(Tip: To add
sub-directories and their files to this detailed listing, add the /S switch as
follows:
dir C:\ {path to directory}
/V/S > prn
And of course, if you want
to send the information to a *.txt file instead of directly to the printer,
just substitute the 'prn' in any of the above commands with the path and name
of a TXT file, like so:
C:\DirListing.txt
last updated: Monday, 24. May 1999 09:47:13 -0500
|