本帖最后由 ArdentMan 于 2011-9-17 16:28 编辑
- @Echo Off
- For /F "delims=" %%a In ('Dir /b ABC*.txt') Do (
- For /F "delims=" %%b In (%%a) Do (
- For /F "tokens=5" %%c in ("%%b") Do (
- If "%%c" EQU "9" Set "Flag=a"
- If "%%c" EQU "" Set "Flag=a"
- )
- If Defined Flag (
- Echo %%b>>%%~na_1.txt&Set "Flag="
- ) Else (
- Echo %%b>>$
- )
- )
- Move $ %%a
- )
复制代码
|