nateday76
nateday76

Reputation: 1

Have a workaround for the 1,000 file limit in a directory on windows mobile 5?

I need to download more than 1,000 files into a windows mobile 5 directory located on the storage card. If i copy the files onto the storage card via my desktop there is no problem. But when i try to download the files from the handheld device I get a disk full error, even though there is plenty of room due to the 1,000 file limit.

Has anyone run into this and found a workaround? I'm going to try zipping all of the files then decompressing on the device but not sure that this will work.

Upvotes: 0

Views: 2620

Answers (4)

Hellbyte
Hellbyte

Reputation: 76

This is a limitation of Windows CE based sytems:

Windows Mobile 2003 for Pocket PC, Windows Mobile 2003 for Smartphone, Windows CE Platform Note: Windows CE cannot store more than 999 files in a directory when the files share the same short file name (that is, the eight-character name, period (.), and 3-character extension). The workaround is to ensure that the short file names are different. For example, if the files are named Longfilename0001.txt through Longfilename1000.txt, place the number at the beginning of the file name instead of at the end.

https://msdn.microsoft.com/ru-ru/library/system.io.filemode(v=vs.85).aspx

So if you do not want to split to different folders, you should start the filename with the number to avoid this limitation. That is why Tary had success with 8.3 filenames, they were short enough.

Upvotes: 1

Tary
Tary

Reputation: 1021

There is a 999 file limit in Windows mobile 6.X as well. However this only applies if you use long file names. If you stick with the 8.3 file name format (8 char name with 3 char extension) then you can have many thousands of files in the same directory without issue.

I bumped into this problem a few years back and my app routinely writes 3000 to 4000 file per directory with 8.3 file format names.

I have never seen the 999 files per directory issue documented by Microsoft or anybody else.

Upvotes: 1

recursive
recursive

Reputation: 86124

Create more directories and put less than 1000 files in each.

Upvotes: 1

ceejayoz
ceejayoz

Reputation: 180065

Split it into multiple directories?

Upvotes: 2

Related Questions