NTFS question - max number of files on root of C:?

K

keith w

I always thought that NTFS did away with limitations on the number of files
you can have in the root directory. Today I had a user that couldn't boot up
to Win2K, the box just sits there with a blinking cursor before the normal
splash screen has a chance to come up, and I figured the hard drive might
have gotten hosed, so I mounted the drive as a slave (E:) in another
computer to see if I could recover any data. When I went to the root of E:
there were exactly 2,048 files there, mostly .csv and .txt files from data
downloads from the past 3 or 4 years, in addition to the normal system
files and app logs. Apparently somebody told this person that this is where
she should put all of her data files. These were all one-off files that
weren't needed anymore so I was able to blow them out and remount the drive
as the master and Win2K boots normally again. The number 2,048 is an exact
multiple of 4 times the 512 limit in FAT... no way this could just be a
coincidence! I Googled this but couldn't find anything that points to a
2,048 file limit on NTFS. Not that this is a big deal or anything that we're
likely to see again, but now I"m really curious.
 
J

John John

You can put 4,294,967,295 on an NTFS volume and technically you can
stuff them all in the root folder if you wanted. There is however
instances where having a "large" number of files in the root folder
leads to MFT fragmentation that could lead to an "NTLDR is missing"
error message when you boot the computer so it is not a good idea to
store too many files in the root folder.
http://support.microsoft.com/kb/320397/ According to that article the
problem was resolved with SP4.

The 2,048 files and the fact that it is a multiple of 512 is a
coincidence only. Did you get the computer to boot after you moved the
files? A blinking cursor only at boot time usually means that there is
no active partition or that the active flag was removed (the wrong
partition is active).

John
 
P

Pegasus \(MVP\)

keith w said:
I always thought that NTFS did away with limitations on the number of files
you can have in the root directory. Today I had a user that couldn't boot
up to Win2K, the box just sits there with a blinking cursor before the
normal splash screen has a chance to come up, and I figured the hard drive
might have gotten hosed, so I mounted the drive as a slave (E:) in another
computer to see if I could recover any data. When I went to the root of E:
there were exactly 2,048 files there, mostly .csv and .txt files from data
downloads from the past 3 or 4 years, in addition to the normal system
files and app logs. Apparently somebody told this person that this is where
she should put all of her data files. These were all one-off files that
weren't needed anymore so I was able to blow them out and remount the drive
as the master and Win2K boots normally again. The number 2,048 is an exact
multiple of 4 times the 512 limit in FAT... no way this could just be a
coincidence! I Googled this but couldn't find anything that points to a
2,048 file limit on NTFS. Not that this is a big deal or anything that
we're likely to see again, but now I"m really curious.

I observe no such limit on my NTFS drive. Why don't you run some
tests yourself? The following command will attempt to create 5000 files:

for /L %a in (1,1,5000) do @echo. > c:\test%a.txt
 
K

keith w

yeah, after I deleted the extra files and remounted the drive as master the
computer booted normally. Weird. Just for drill I ran a chkdsk (no problems
found) and defragged the volume. That 2,048 number really caught my eye and
reminded me of the 512 FAT limit. I'm no math major but having worked with
computers since DOS 2 numbers like 512, 1,024, and 2,048 send up all kinds
of red flags.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top