What else on earth can the DIR command do other than displaying the lousy
directory of files? The DIR is regarded as a cheap tool from DOS which most
people try to avoid. No use of it since the invention of Explorer has hidden the
use of DIR. But the DIR command can actually do more things than you ever dreamt
of

Now, to use a DIR with a display of long filenames. use the /v switch. It
will even tell you the total size of of files allocated - something like
Explorer. Now, to make sure they don't scroll out of the screen, use the /p
switch. To look even more like Explorer, we must sort the files out. Use the /o
switch to make it sort it looking like a Detail view in Explorer. File
attributes never was a necessary in DOS. but now with Explorer, we have tons of
files that are hidden or read only. Try the /a switch to turn view all files
with their attributes. All files in Explorer are capitalized, all in lowercases,
all in uppercases or mixed. However, our dear DOS will display everything in
uppercase (all in capital letters) only. To enable lowercase letters, use the /l
switch. Finally, if you are preparing for year 2000, use the /4 switch to enable
4 digits date.

Now that we are done discussing the more useful switches, our final DIR
command will look something like this:

dir /v/p/o/a/l/4

Much better than the original one isn't it? Now wait a minute - are we really
going to type this at the command prompt just in order to get a better DIR? No
we are not. Switches may be preset in the DIRCMD environment variable. Just set
the DIR command like this:

SET DIRCMD=/V/P/O/A/L/4

Now whenever you type just DIR, DOS will help you type the whole thing - dir
/v/p/o/a/l/4. Useful isn't it? To permanently stick it onto your DOS Prompt,
just add this line