Board logo

标题: [求助]dos下批处理中如何识别u盘? [打印本页]

作者: flyinthesky     时间: 2007-6-24 21:34    标题: [求助]dos下批处理中如何识别u盘?
是针对不同的机器,具体怎么操作,求教了!
拜谢!!

作者: flyinthesky     时间: 2007-6-24 22:06
就是想写一个自动查找并copy u盘内容的批处理,有哪位大哥帮一下吗?

作者: my3439955     时间: 2007-6-25 14:33
fsutil fsinfo drivetype C:

作者: HAT     时间: 2007-6-25 15:52
try this one:

@echo off
set AllDrive=c d e f g h i j k l m n o p q r s t u v w x y z
cd.>%tmp%\MyDrive.txt
for %%a in (%AllDrive%) do (
fsutil fsinfo drivetype %%a: | find /i "Removable Drive">>%tmp%\MyDrive.txt
)
for /f "tokens=1 delims= " %%h in (%tmp%\MyDrive.txt) do (
echo %%h is a usb drive.
)
del %tmp%\MyDrive.txt


Last edited by HAT on 2007-6-25 at 03:54 PM ]

作者: lianjiang2004     时间: 2007-6-25 20:01
楼上的看清楼主要求。是要dos下的。呵呵。

作者: HAT     时间: 2007-6-25 21:25
DOS下的啊
汗水
没有DOS环境
:'(

作者: flyinthesky     时间: 2007-6-25 23:21
有解决的办法吗?呵呵,是不是不可能完成啊?

作者: flyinthesky     时间: 2007-6-25 23:24
多谢指教!学习中……