I used the following code to format my SD card if it has not been formatted already. After being formatted, the sdvolumeinfo.Format(“FAT”, 0) command names the card “MFDISK”. Is there a way of changing that name to something else? I’ve looked through Microsoft.SPOT.IO documentation without success.
public SDLogger()
{
try
{
// try to access the microSD
sdPS = new PersistentStorage("SD");
sdPS.MountFileSystem();
// Format the media if it was not.
VolumeInfo sdvolumeinfo = new VolumeInfo("SD");
if (!sdvolumeinfo.IsFormatted)
{
Debug.Print("Formatting SDCARD...");
sdvolumeinfo.Format("FAT", 0);
}
sdvolumeinfo = null;
Debug.Print("Card is formatted!");
SDinit();
}
catch
{
// if failed, assume no card in slot
cardLoaded = false;
}
}