The default behavior of the operating system when searching on an extension is to find the everything that starts with the characters you specify.
I first documented this behavior in Windows NT Short File Extensions, but finding that tip is unlikely due to the wording that I used.
NOTE: This behavior effects all commands, like DEL and COPY, not just DIR.
When you dir *.htm, it returns .htm files and .html files.
I have scripted Win95TruncatedExtensions.bat to turn off this behavior.
The syntax for using Win95TruncatedExtensions.bat is:
NOTE: Win95TruncatedExtensions.bat uses REG.EXE built into Windows XP and Windows Server 2003, or REG.EXE from the Windows 2000 Support Tools on the CD-ROM.
@echo off setlocal set key=HKLM\system\currentcontrolset\control\filesystem @echo REG ADD %key% /V Win95TruncatedExtensions /T REG_DWORD /F /D 0 REG ADD %key% /V Win95TruncatedExtensions /T REG_DWORD /F /D 0 ) endlocal