Take the drive letter of the hard disk partition, use the API function: getDriveType
[DLLIMPORT ("kernel32.dll", entrypoint = "getDriveType")]
Public Static Extern Int GetDriveType (String NDrive);
Call: String [] DIRS = Environment.getLogicalDrives (); // Get all drives forward (String Dir in DIRS) {? F (getDriveType (DIR) == 3) // Is the hard disk? {??? // Add it to the list? Subdirs) {?? IF (Subdir.attributes.tostring (). Indexof ("Hidden") <0 || Subdir.attributes.tostring (). Indexof ("System") <0)? {?? ...? }