|
Answer» i SAW this batch file on DosTips
Code: [Select]setlocal enableextensions disabledelayedexpansion set SEARCH1=name set REPLACE1=ename set SEARCH2=sal set REPLACE2=esal
FOR %%F IN ( file1.TXT file2.txt ) DO (
for /f "delims=" %%i in ('type "%%F" ^& break ^> "%%F" ') do ( set "line=%%i" setlocal enabledelayedexpansion set "line=!line:%SEARCH1%=%REPLACE1%!" set "line=!line:%SEARCH2%=%REPLACE2%!" >>"%%F" echo !line! endlocal ) ) this is update (find-replace) word in text i wanna different... i wanna delete ALL line
source text : This is first line long winter DAYS coming And waiting sunshine
i will search "winter" words in txt files.. and delete complately that line...
result text : This is first line
And waiting sunshine
how i can do ? thx
Quote from: TosunPASA on December 10, 2016, 06:38:54 PM i saw this batch file on DosTips
Then why don't you ask the question on the DosTips forums?
|