Directory.GetFiles() listing files in a SD Card folder created on Windows 7

If we create a folder on an SD card on a Windows 7 PC and then place files in it we cannot list those files in NETMF using Directory.GetFiles(). Directory.GetDirectories() will enumerate the folder though. Folders created on a digital camera will have their files listed by Directory.GetFiles(). If we create the folder on NETMF and then rename it on a PC and add files, this is OK.

Any ideas why NETMF cannot enumerate files in a folder created by a PC?

Note: The test PC is Windows 7 x64

Thanks.

Format your drive and try again.
Create a file on NETMF and try to read on PC.

Gus, maybe I wasn’t clear enough. We are trying to establish a folder “settings” where the user can drop in configuration files on the SD card using his/her PC. Then insert the card in the NETMF device where it will enumerate the files in the “settings” directory and configure itself accordingly.

If the folder is created on the SD card on the device using NETMF code, then we can create files in it using the PC and they can be enumerated on the NETMF device using Directory.GetFiles(). If the “settings” folder is created on the PC the NETMF device can see the folder but will not enumerate its files.

This was tested on several SD cards and on both the CANXtra and EMX platforms with the same results.

Yes correct. I was thinking the card is not formatted correctly. Also try FAT and FAT32

I had the same.issue. Format32 solved this

@ Diesel Engineer - I also formatted as FAT32, created folders, copied files from PC drives to SD card, and Directory.GetFiles on NETMF v4.1 on Panda II works correctly.

@ andre.m - whoops! Didn’t see that.