1个回答
2013-09-25
展开全部
下面是一段运行后,自动循环检测是否有U盘,有则复制当前文件夹下的abc.mp3文件到U盘根目录并退出 @echo off:st
for /f "skip=1" %%i in ('wmic logicaldisk where "drivetype=2" get caption') do (if "%%i" gtr "A" copy abc.mp3 %%i\ && exit)
ping 127.1 >nul
goto st
for /f "skip=1" %%i in ('wmic logicaldisk where "drivetype=2" get caption') do (if "%%i" gtr "A" copy abc.mp3 %%i\ && exit)
ping 127.1 >nul
goto st
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询