
| Quote: | |
|
CODE: [Copy to clipboard]@echo off&setlocal enabledelayedexpansion
copy /y nul new.txt
findstr "abc123" 2.txt >nul || >>new.txt echo=abc123
for /f "delims=" %%i in ('findstr /v "text" 2.txt') do (
set a=%%i
if "!a!"=="abc123" (>>new.txt echo=abc321) else (
>>new.txt echo=!a!)
)
start new.txt&exit/b
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |