This article was previously published under Q130694
Windows NT takes a long time to perform directory operations on Windows NTfile system (NTFS) formatted drives that contain a large number of fileswith long file names (names that do not conform to the 8.3 convention) in asingle directory.
When you save a file with a long file name to an NTFS drive, NTFS creates,by default, a second file directory entry with a short file name conformingto the 8.3 convention.
When NTFS enumerates files in a directory, it has to look up the 8.3 namesassociated with the long file names. Because an NTFS directory ismaintained in a sorted state, corresponding long file names and 8.3 namesare generally not next to one another in the directory listing. So, NTFSuses a linear search of the directory for every file present. As a result,the amount of time required to perform a directory listing increases withthe square of the number of files in the directory. For small numbers offiles (less than a few hundred) the time delay is negligible. But as thenumber of files in a directory increases to several thousand, the timerequired to perform a listing can increase to minutes, hours, or even days.The problem is aggravated if the long file names are very similar --differing only in the last few characters.
To work around this problem in Windows NT 3.1, avoid having large numbersof files with long file names in a single directory.
To work around this problem in Windows NT 3.5, turn off NTFS automatic 8.3name generation using the Registry Editor:
WARNING: Using Registry Editor incorrectly can cause serious, system-wideproblems that may require you to reinstall Windows NT to correct them.Microsoft cannot guarantee that any problems resulting from the use ofRegistry Editor can be solved. Use this tool at your own risk.
Run Registry Editor (REGEDT32.EXE).
From the HKEY_LOCAL_MACHINE subtree, go to the following key:
From the Edit menu choose DWORD.
Change the Data value to 1. Leave the Radix set to Hex.
Shutdown and restart Windows NT.
NTFS will no longer create short file names (8.3 names) when you createfiles with long file names.
NOTE: Files that already have long file names and short file names are notbe affected by this change.
Microsoft has confirmed this to be a problem in Windows NT version 3.5. Afix to this problem is in development, but has not been regression-testedand may be destabilizing in production environments. Microsoft does notrecommend implementing this fix at this time. Contact Microsoft ProductSupport Services for more information on the availability of this fix.