今天看到这问题
小弟以前也想过
我的想法很简单~~
一般的硬碟机理,一定会有 System Volume Information 文件夹
因此只要侦测,磁盘里有没有 System Volume Information
就能判断为硬碟还是随身碟- @ECHO OFF
- for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do (if exist %%i: (
- if not exist "%%i:\System Volume Information" (echo %%i is USB)))
- PAUSE
复制代码
PS 随身碟 = U盘 (台湾用语)
[ 本帖最后由 strong12345 于 2009-7-1 12:51 编辑 ] |