- @echo off
- ::utf-8编码用chcp 437命令 不支持utf-16
- if "%~1"=="" echo 拖拽目标至%~n0即可&ping 0 -n "3">nul&exit
- set n=----a123----258
- for /F "tokens=1* delims=:" %%i in ('findstr /n .* "%~1"') do findstr /B /E /C:"%%j" "2.txt">nul 2>&1 || echo.%%j>>2.txt
- (for /f "delims=" %%i in ('type 2.txt') do echo %%i%n%)>"%~dp1新_%~nx1"
- del 2.txt
- pause
复制代码
|