PRB: Win 95 Copies Fewer Files in Root Directories than Win NT

ID: Q161982

4.00 WINDOWS kbprg kbprb

The information in this article applies to:

SYMPTOMS

Applications on Windows NT successfully copy up to 224 files to the root directory of a 1.44MB floppy disk. However, on Windows 95, they can only copy up to 112 files. In each case, the file names are mixed-case but use the standard 8.3 format (short filenames).

Because of this behavior, Windows 95 can save only half as many short mixed- case filenames in the root directory of all sizes of floppy and hard disks as Windows NT. This rarely becomes a problem because the maximum number of entries in the root directories for all floppy disks and hard disks is much larger than is actually needed to store files in a root directory.

CAUSE

Windows 95 and Windows NT behave differently because of the way the two platforms store mixed-case short (8.3) filenames. Windows NT stores each mixed-case short filename in a single directory entry with its case preserved. Windows 95, however, creates two directory entries for mixed- case short filenames: one entry is for the 8.3 name in all upper-case (as MS-DOS stores filenames); the second is for a long filename entry that stores the filename in mixed-case.

Although Windows 95 stores mixed-case short filenames with two directory entries, it stores all upper-case short filenames in a single directory entry just as MS-DOS does.

RESOLUTION

There is no direct means for Win32 applications to determine the exact number of unused root directory entries on a FAT volume, nor should applications rely on there being a certain number free. In fact, applications that are dependent on putting files into the root directory should not be developed.

You can take two approaches to handle this difference in behavior between platforms:

STATUS

The behavior difference is by design due to implementation choices made in the two platforms.

KBCategory: kbprg kbprb KBSubcategory: BseFileio Additional reference words: 4.00 4.0 95 kbdss floppy LFN diskette SFN

Keywords          : kbAPI kbKernBase kbGrpKernBase 
Version           : 4.00
Platform          : WINDOWS

Last Reviewed: January 13, 1997