未考虑特殊字符- @echo off
- for /f "tokens=1* delims=:" %%a in ('findstr /lxv /g:d.txt fy???.txt') do set d_%%b=1
- (for /f "tokens=2 delims=_=" %%a in ('set d_') do echo %%a)>d多余.txt
- for /f "tokens=1* delims=:" %%a in ('findstr /lxv /g:聊天冲浪.txt fy???a.txt') do set 聊天冲浪_%%b=1
- (for /f "tokens=2 delims=_=" %%a in ('set 聊天冲浪_') do echo %%a)>聊天冲浪多余.txt
- for /f "tokens=1* delims=:" %%a in ('findstr /lxv /g:棋牌对战.txt fy???b.txt') do set 棋牌对战_%%b=1
- (for /f "tokens=2 delims=_=" %%a in ('set 棋牌对战_') do echo %%a)>棋牌对战多余.txt
- for /f "tokens=1* delims=:" %%a in ('findstr /lxv /g:e.txt fy???e.txt') do set e_%%b=1
- (for /f "tokens=2 delims=_=" %%a in ('set e_') do echo %%a)>e多余.txt
- pause
复制代码
|