Microsoft KB Archive/69578

DIR .EXT Does Not Produce *.EXT Listing PSS ID Number: Q69578 Article last modified on 07-14-1993 PSS database name: O_MSDOS

4.00 4.01 4.01a

MS-DOS

Summary:

The MS-DOS DIR command syntax

dir .ext

does not work correctly in MS-DOS versions 4.x. The command should produce a listing of all files with the extension “.EXT” in the directory, as documented on page 58 of the version 4.x “Microsoft MS-DOS User’s Reference.” Instead, MS-DOS displays the error:

Invalid directory

The simpler version of the command, “DIR .ext”, works correctly, displaying all of the files with an extension of “.EXT” in the current directory.

This command syntax works correctly in all forms under versions of MS-DOS earlier than version 4.0.

More Information:

Just as the DIR command automatically expands “DIR FILE” to &quot;DIR FILE.*“, it should expand”DIR C:.EXT&quot; to “DIR C:*.EXT”.

The following DIR usage variations work correctly under MS-DOS 4.0:

DIR .COM DIR .COM DIR C:.COM

The following DIR usage variations do NOT work correctly under MS-DOS version 4.0; they generate an “Invalid directory” error message:

DIR C:.COM DIR .COM DIR ..COM DIR ...COM

All of the above syntax variations work without error in MS-DOS versions 3.2, 3.21, 3.3, and 3.30a.

Microsoft has confirmed this to be a problem in Microsoft MS-DOS versions 4.0, 4.01, and 4.01a. This problem does not occur in later versions of MS-DOS.

Additional reference words: 4.00 4.01 4.01a noupd

Copyright Microsoft Corporation 1993.