Cannot copy 31,097 files to FAT32 directory

vbimport

#1

I’m using Windows XP Home.
I have an archived copy of my favorite forum that is viewable offline.
The forum is www.oesf.org/forums/
This forum is about open embedded devices, specifically the Sharp Zaurus.
There is a folder in this archive that contains 31,097 files, called \index.php
These are all the links to the threads/topics/posts

I can copy this archive from one NTFS partition to another NTFS partition on my desktop PC with no problems.

My problem occurs when I try to copy this to a FAT32 formatted SD card or CF card.
This process of copying this archive to a memory card takes about 2-3 hours.
When the copy process gets to about 7/8 complete, I always get this error and copying stops.
“copy xxx.html failed: cannot create file or directory”
If I try to add just one more file to \index.php folder, I get the same error message.
Have I reached the limitations of FAT32?
Someone told me a FAT32 folder can contain 65,535 files.
There are only 23,811 files in the folder, but a lot of the filenames are really long.
Have I reached the limit of characters that a FAT32 folder can hold, even though I haven’t surpassed the 65,535 file limit?

I also get the same problem when trying to copy this archive to my 6GB hard drive on my Zaurus handheld.
I want to get this complete archive on my flash memeory or internal hard drive, so I can view the forum offline on my handheld.
Thank you,
Jon


#2

Sounds like a database with a deep directory structure. Most devices have some limit to the depth allowed in the directory structure, maybe this is the trouble?


#3

I seem to remember that the long filename support in FAT filesystems use extra directory entries, so for every filename longer than 8.3 you use at least one more directory entry (one per 13 additional characters).

See e.g. this article at Wikipedia and the Long Filename Specification.


#4

Thank you for your answers. :slight_smile:
DrageMester, what you posted seems to be my exact problem.
Especially the long filenames taking up up to 3 or more directory spaces as shown in your link to http://home.teleport.com/~brainy/lfn.htm

Someone over at OESF is going to convert this archive to a cramfs or squashfs archive. This should overcome the problem I’m having.
BTW, I’m using this archive on my Zaurus, which is a Linux device, hence the usage of squashfs and cramfs images.

Thanks again,
Jon