Number of files that can be saved in the USB memory

In the operating environment of WEC 7, it was not possible to output more than 999 files to the USB memory.

Although the file system is FAT 16, I think that the number of files / folders that can be created was 65,517 pieces.

Is this a constraint on the module? Or is it a general specification?

Dear @kyas

The limitations are only given by the storage capacity of the USB drive, and the file system used.
There is no additional restrictions introduced from our side.

The FAT file systems can handle only a few hundred files in the root folder, and 65k files in any subfolder. Please note that file names longer than 8.3 consume multiple entries.

Regards, Andy

Dear @andy.tx

I actually tested it with Colibri iMX6 WEC 7 v1.2.

I copied a simple text log file in the USB memory using Explorer, and confirmed that When the disk exceeds 999 pieces, I get an error" Disk space is insufficient ".

It is like the attached image. I am sorry that the screen is difficult to understand in Japanese.

[upload|5RuaV2Z6mDYLeq8bddNJZJvHaoY=]
[upload|l4noca9dD3+9AbfIpcwKvoZ62wU=]

This USB memory is formatted with exFAT.

There is enough free space.

The number of files used is about 3000, and there is enough available space.

The file name is “TraceLogyyMMddHH.log”, and it is assumed that you are using multiple entries, but I think that it is a problem free level.

On Windows 7 PC, of ​​course, file copying is possible beyond 999 pieces.

It seems that it is not consistent with this phenomenon only by limiting the file system.

In order to solve this problem, what should be investigated elsewhere?

Dear @kyas

The filesystem you are using is fat32, not exFat. Please note that exfat.dll is used for both of these file systems. The relevant information is the partition type 0x0B, which is shown in the same dialog. You can find a list of file partition types here (exFat = 0x07, fat32 = 0x0B).
If you format the pen drive on your PC, you can easily select exFat as the target file system.

To prove that exFat works for your use case, I did the following test:

  1. On my PC I formatted a Pen drive as
    exFat

  2. I copied a batch file createfiles_ce.bat onto the pen drive. The batch file simply generates 999 files (each 6 bytes of contents) in a folder \USB HD\log2\

  3. Under WinCe I ran the batch file createfiles_ce.bat
    echo 0001 >\usb hd\log2\Tdxlog0001.log
    ...

  4. I copied the file *0999.log and pasted it several times into the same folder - no error message.
    [upload|TDeYFhdHhlTyIaH554qwLHXUqDQ=]

    [upload|r680cM3YzlSYV874UoZfr0F0TdI=]

  5. I repeated the same test using fat32 as the file system. With this configuration I got the same limitation as you saw - it is not possible to store more than 999 files in one folder.

Regards, Andy

Dear @andy.tx

Thank you very much for your quick reply.

I tried using the created batch file, but I got the same result as you.
That is, more than 999 files could be copied on exFAT. An error was output to FAT32.

And although it becomes the first question repeatedly, what kind of restriction is applied to the fact that FAT32 can not output more than 999 files?

Dear @kyas

I did some additional tests with Fat32 with surprising results:

  • If the folder is filled with >1000 files on a PC, WinCe can handle more files in this folder - even if files are deleted from that folder to get below 1000 files limit.
  • The problem does not appear on CE6, it seems it was introduced in WEC7
  • File operations (selecting all files, display properties for 1000 files) were massively faster on CE6.

Unfortunately we don’t have source code of the Fat file system after CE6, and we know that the file system code for WEC7 was changed significantly by Microsoft.
If it is very important for you we could try to recompile the CE6 file system in order to use it for WEC7, but it is hard to say how much effort this would require, and what side effects this would have - if it would work at all.
I rather recommend to split your log files into multiple subfolders.

Regards, Andy

Dear @andy.tx

Thank you very much for your kind reply.

I learned that this issue is not a general specification of the file system, it is a limitation of the WEC7 OS, not a module limitation.
This was a very meaningful learning.

Since I can avoid this problem by formatting the USB memory with exFAT, I will try to do so.

Finally, I asked a question about WEC7 of Colibri iMX 6 this time, but are there similar problems with Apalis Txx’s other modules?

Dear @kyas

I observed the same limitation also on a Colibri T20, on both WEC7 and WEC2013.
So I assume it is a generic limitation of WEC7 and WEC2013.

Regards, Andy