Since the root of any storage card is represented as a directory inside of the root of the device, you can iterate all directories inside the root folder (“/”) and check their attributes to see if they comply to be a storage card. use the following code to look for a storage card:

Public Function GetStorageCard() As DirectoryInfo Dim deviceRoot As New DirectoryInfo("/") For Each dir As DirectoryInfo In deviceRoot.GetDirectories() If dir.Attributes = FileAttributes.Directory AndAlso _ dir.Attributes = FileAttributes.Temporary Then Return dir End If Next End Function

Enjoy !