In a UWP application, I obtain all the removable devices with :
KnownFolders.RemovableDevices.GetFoldersAsync()
I want to exclude optical devices and keep only the external hard disk or flash devices.
I tried to find a suitable property by using the following :
device.Properties.RetrievePropertiesAsync(...)
and tried a lot of properties from here but can't fin anything.
Anybody have an idea?
You could build an AQS filter string when you enumerate devices. See Build a device selector .
If you are not familiar with the AQS format, you can read more at Using Advanced Query Syntax Programmatically .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.