You are currently offline, waiting for your internet to reconnect

Command Prompt's Treatment of Long File Extensions

This article was previously published under Q164351
This article has been archived. It is offered "as is" and will no longer be updated.
IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.
When you perform file management using wildcards from the command prompt,files with long extensions may be unexpectedly displayed, copied, ordeleted.
By default, Windows NT 4.0 mimics the Windows 95 behavior of truncatinglong file extensions under certain operations from the command line. Filemanagement operations directed at a 3 digit extension may also includefiles with an extension containing more than 3 digits where the first 3digits match the operation argument.

This behavior only affects file management commands such as dir, del,move, and copy that are executed at a command prompt. File managementoperations performed by Find, File Manager, or Windows NT Explorer do notperform in this manner.
WARNING: Using Registry Editor incorrectly can cause serious problems thatmay require you to reinstall your operating system. Microsoft cannotguarantee that problems resulting from the incorrect use of Registry Editorcan be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys AndValues" Help topic in Registry Editor (Regedit.exe) or the "Add and DeleteInformation in the Registry" and "Edit Registry Data" Help topics inRegedt32.exe. Note that you should back up the registry before you edit it.

To control this behavior, perform the following steps:
  1. Start Registry Editor (Regedt32.exe) and go to the following subkey:
  2. Edit the following value:
    Win95TruncatedExtensions : REG_DWORD : 0/1 [Default=1]
    The following is an example showing the behavior with each setting on a directory containing the two files:
    - htm
    - html
    Default behavior of Win95TruncatedExtensions set to 1:
    DEL *.htm - Deletes both 1.htm and 2.html.
    DEL *.html - Deletes 2.html.
    Modified behavior of Win95TruncatedExtensions set to 0.
    DEL *.htm - Deletes 1.htm
    DEL *.html - Deletes 2.html
  3. For the changes to take effect, restart your computer.
remove fat ntfs subdir

Article ID: 164351 - Last Review: 12/04/2015 16:27:02 - Revision: 1.1

Microsoft Windows NT Workstation 4.0 Developer Edition, Microsoft Windows NT Server 4.0 Standard Edition

  • kbnosurvey kbarchive kbprb kbusage KB164351