Find the Root Folder Name of the SD Card.
void getSdCardPath()
{
DirectoryInfo rootDir = new DirectoryInfo(@"\");
FileAttributes attrStorageCard = FileAttributes.Directory |
FileAttributes.Temporary;
ArrayList myAttr = new ArrayList();
foreach( FileSystemInfo fsi in rootDir.GetFileSystemInfos() )
{
if ( (fsi.Attributes & attrStorageCard) == attrStorageCard )
{
//Found storage card
myAttr.Add(fsi.FullName.ToString());
}
}
}
reference:
http://www.pcreview.co.uk/forums/detect-storage-card-root-folder-name-t1308987.html