- @echo off
- title 自动检测
- mode con: cols=40 lines=15
- setlocal enabledelayedexpansion
- set dr1=%cd%
- set dr2=%cd%\批处理临时文件夹
- if not exist 批处理临时文件夹 md 批处理临时文件夹
- cd /d %dr2%
- :again
- set num1=%num%
- for %%i in (I,J,K,L,M,N,O,P,Q,R ) do (
- set m%%i= %%i:不存在或者没插好
- )
- del /q lieb.txt 2>nul
- call :xiezc
- set /a num=0
- wmic logicaldisk where "drivetype=2" get caption|find ":">>lieb.txt
- for /f "skip=1 delims=:" %%a in (lieb.txt) do (
- set /a num+=1
- if exist "%%axie.txt" (
- for %%i in (I,J,K,L,M,N,O,P,Q,R ) do (
- if "%%a" == "%%i" set m%%a=!num! :%%a:复制完毕卸载中!
- )
- )
- call :jiestix %%a
- if exist %%a:k.txt (
- for %%i in (I,J,K,L,M,N,O,P,Q,R) do (
- if "%%a" == "%%i" set m%%a=!num! :%%a:还在检查中!
- )
- )
- if exist "%%a:t.txt" (
- for %%i in (I,J,K,L,M,N,O,P,Q,R) do (
- if "%%a" == "%%i" set m%%a=!num! :%%a:复制数据中,请留意!
- )
- )
- if exist "%%a:o.txt" (
- for %%i in (I,J,K,L,M,N,O,P,Q,R) do (
- if "%%a" == "%%i" set m%%a=!num! :%%a:复制已经结束,请注意!
- )
- )
- if not exist "%%a:o.txt" (
- if not exist "%%a:t.txt" (
- if not exist "%%axie.txt" (
- if not exist "%%a:k.txt" (
- set m%%a=!num! :%%a:符合盘,即将复制
- cd /d "%dr1%\批处理包"
- start /b %%a.bat
- cd /d %dr2%
- )
- )
- )
- )
- )
- mode con: cols=40 lines=15
- color 0f
- echo 本次扫描共:!num!张卡
- echo 上次扫描共:%num1%张卡
-
- for %%i in (I,J,K,L,M,N,O,P,Q,R) do (
- echo !m%%i!
- )
- echo 稍后重新扫描,请留意盘情况变化
- set /p=10秒<nul
- for /l %%i in (3 -1 0) do (
- for /l %%j in (1 1 4) do (
- set /p=<nul
- )
- if %%i lss 10 (
- set /p= 0%%i秒<nul
- ) else (
- set /p= %%i秒<nul
- )
- title %%i 秒后重新扫描~
- ping 127.0.0.1 -n 2 >nul 2>nul
- )
- goto again
- goto :eof
-
- :xiez
- if exist "%1xie.txt" (
- for %%i in ( I,J,K,L,M,N,O,P,Q,R ) do (
- if "%1" == "%%i" set m%1=%1:复制完毕卸载中!
- )
- )
- goto :eof
-
- :xiezc
- for %%i in (I,J,K,L,M,N,O,P,Q,R) do (
- if exist "%%ixiecg.txt" del /q %%ixiecg.txt
- )
- goto :eof
-
- :jiestix
- if exist "%1:o.txt" (
- cls
- mode con: cols=30 lines=3
- echo %1复制完成!
- set /p=5秒<nul
- for /l %%i in (1 -1 0) do (
- for /l %%j in (1 1 3) do (
- set /p=<nul
- )
- set /p=%%i秒<nul
- color %%if
- title %%i 秒后提醒结束
- ping 127.0.0.1 -n 2 >nul 2>nul
- )
- )
- goto :eof
复制代码
用start /b启动的代码是什么?贴出来看看是否存在影响效率的部分 |