本帖最后由 terse 于 2014-1-10 13:28 编辑
效率不理想- @echo off&setlocal enabledelayedexpansion
- >$ dir /b /a-d K:\x\y\z\*.*
- for /f "delims=" %%i in (a.txt) do (
- set "str="
- for /f "tokens=*" %%j in ('findstr /ibc:"%%i"') do set str=!str!,%%j
- if defined str (echo %%i --^> !str:~1!) else echo %%i --^> Null
- )
- >b.txt findstr /ivbg:a.txt $
- del $
- pause
复制代码
|