blank.gif (43 bytes)

Church Of The
Swimming Elephant

Search:
index.gif

ntcmds00000000.gif

Dir--Examples

Suppose you want dir to display one directory listing after another, until it has displayed the listing for every directory on the disk in the current drive. Suppose also that you want dir to alphabetize each directory listing, display it in wide format, and pause after each screen.

To specify such a display, be sure the root directory is the current directory and then type the following command:

dir /s/w/o/p

Dir lists the name of the root directory, the names of the subdirectories of the root directory, and the names of the files in the root directory (including extensions). Then dir lists the subdirectory names and filenames in each subdirectory in the directory tree.

To alter the preceding example so that dir displays the filenames and extensions but omits the directory names, type the following command:

dir /s/w/o/p/a:-d

To print a directory listing, type the redirection symbol and PRN after any form of the dir command, as the following example shows:

dir > prn

When you specify PRN on the dir command line, the directory listing is sent to the printer attached to the LPT1 port. If your printer is attached to a different port, you must replace PRN with the name of the correct port.

You can also redirect output of the dir command to a file by replacing PRN with a filename. A path is also accepted on the command line. For example, to direct dir output to the file DIR.DOC in the RECORDS directory, type the following command:

dir > \records\dir.doc

If DIR.DOC does not exist, Windows NT creates it, unless the directory RECORDS also does not exist. In that case, Windows NT displays the following message:

File creation error

To display a list of all the filenames with the .TXT extension in all directories on drive C, type the following command:

dir c:\*.txt /w/o/s/p

Dir displays, in wide format, an alphabetized list of the matching filenames in each directory and pauses each time the screen fills, until you press a key to continue.

More Information About Dir

ntcmds00000001.gif Dir--Notes

ntcmds00000001.gif Dir

Cotse.Net

Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

 
.
www.cotse.com
Have you gone to church today?
.
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 Cotse.com.
Cotse.com is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609