本帖最后由 happy886rr 于 2016-3-29 21:55 编辑
回复 1# iedcsve 应该是你要的吧- @echo off&setlocal enabledelayedexpansion
- (for /r %%a in (*.txt) do (
- for /f "tokens=4-7 delims=_-" %%w in ("%%~na") do (set str=20%%~w%%~x%%~y-%%~z)
- for /f "tokens=3" %%w in ('type "%%a"^|findstr /irc:"\$\$ SERIAL 20[0-9][0-9][0-1][0-9][0-3][0-9]-[0-9]*"') do (set std=%%~w)
- if not "!str!"=="!std!" (set/a i+=1 &echo 编号:!i! 谬名文件%%~nxa 归属目录%%~dpa)
- ))>谬名清单.log
- start 谬名清单.log
复制代码
|