LeeTutor's Doing Windows

Home Page

Doing Windows

Windows Tips Categories

MS-DOS Tips

NEW DIR COMMAND SWITCHES

If you are an old time user of computers, you may remember DOS, the Microsoft precursor to Windows? It's still around, of course, for there is an entry on every Windows 9x computer's Start Menu for the MS-DOS Prompt. Anyway, DOS users will undoubtedly know about the DIR command, which lists directory and file names in a screen that is similar to the right pane of Explorer in "Details" view. Windows 95 introduced a new version of DOS, version 7.0, and with it were added some new switches to the DIR command, some of them undocumented. If you type the normal DIR command at the DOS prompt, you get a list of directories and files in the old 8.3 format. "8.3 format" means that it used to be the case that file/directory names could only have up to 8 characters followed by a period followed by up to 3 characters. That means that any long file/folder name, like "American Online 4.0", is shortened to something like "Americ~1". But in the rightmost column of the listing from DIR will be the long filename. It will look something like this:

AMERIC~1 <DIR> America On Line 4.0

A new switch to the DIR command, namely DIR /Z, will eliminate that column listing the long file name. Another new switch, DIR /B, displays only the leftmost column, but the name there will be a long filename rather than the 8.3 format.