How can I determine if a given drive letter is a local, mapped, or USB drive?

后端 未结 5 1936
醉梦人生
醉梦人生 2020-12-05 05:09

Given the letter of a drive, how can I determine what type of drive it is?

For example, whether E:\\ is a USB drive, a network drive or a local hard drive.

5条回答
  •  醉话见心
    2020-12-05 05:57

    DriveType shows SUBSTed drives also as DriveType.Fixed.

    To check if a drive is substed I use the code How to determine if a directory path was SUBST'd.

提交回复
热议问题