怎么用bat查找文件并检测到u盘后复制到u盘
下面是一段运行后,自动循环检测是否有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
赞 (0)
下面是一段运行后,自动循环检测是否有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