File Limit for DIR Command Sort Options

Article translations Article translations
Article ID: 100842 - View products that this article applies to.
This article was previously published under Q100842
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SYMPTOMS

When you use the DIR command with the /O switch at a command prompt, you may receive the following error message:
Too many files, directory not sorted
The directory listing is then displayed, but it is not sorted as you requested.

CAUSE

There are more files in the directory than the command interpreter (COMMAND.COM) can sort. The maximum amount of memory that COMMAND.COM can allocate for a DIR operation is 64 kilobytes minus 512 bytes. Each file displayed by the DIR command requires 22 bytes for its entry, making the total number of files that can be displayed in a sorted directory equal to 2295 files [(65536-512)/22].

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The MS-DOS DIR command is internal (built-in) to COMMAND.COM. The DIR command uses memory allocated by COMMAND.COM for its processing.

REFERENCES

For more information about the DIR command and its sorting options, type dir /? at an MS-DOS command prompt.

Properties

Article ID: 100842 - Last Review: October 22, 2013 - Revision: 2.0
APPLIES TO
  • Microsoft MS-DOS 5.0 Standard Edition
  • Microsoft MS-DOS 5.0a
  • Microsoft MS-DOS 6.0 Standard Edition
  • Microsoft MS-DOS 6.2 Standard Edition
  • Microsoft MS-DOS 6.21 Standard Edition
  • Microsoft MS-DOS 6.22 Standard Edition
  • Microsoft Windows 95
Keywords: 
kbnosurvey kbarchive KB100842

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com