下面是一段运行后,自动循环检测是否有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
办公百科2023-04-21 00:19:36佚名
下面是一段运行后,自动循环检测是否有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