这样呢?- @echo off
- if not exist Not12\ md Not12
- for /f "delims=" %%i in ('dir /b /a-d "*.txt"') do set "str="&call:lp "%%i"
- pause&exit
- :lp
- for /f "tokens=1-3* delims=‖" %%a in ('findstr /iv "<<錯誤>>" %1') do (
- if not defined str (set str=%%i&>>"new_Tmp_%~1" echo %%a‖%%b‖%%c‖%%d)else (
- set "str=%%d"
- setlocal enabledelayedexpansion
- for /l %%i in (1 1 9) do (
- set "str=!str:*‖=!"
- )
- if "!str!"=="" (
- endlocal
- >>"new_Tmp_%~1" echo %%a‖%%b‖?‖%%d
- ) else (
- move %1 "Not12\%~1"& del "new_Tmp_%~1" 2>nul&exit/b
- )))
复制代码
|