jrepl: replace + append in cmd file
Posted: 12 Nov 2020 11:39
Hey there.
In a cmd file I need to
- replace one string with another in a txt file
- append string '.jpg' to every single row of the same txt file
I've done the first part with
How can I do the second part, possibly without iterating again all the rows of the "%excludeFile%"?
Thanks!
In a cmd file I need to
- replace one string with another in a txt file
- append string '.jpg' to every single row of the same txt file
I've done the first part with
Code: Select all
set "excludeFile=C:\BBB\CCC\list.txt"
set "newExcludeFile=C:\BBB\CCC\list_new.txt"
set "SEARCHTEXT=\AAA\"
set "REPLACETEXT=\EEE\AAA\"
if exist "%newExcludeFile%" del "%newExcludeFile%"
call jrepl "%SEARCHTEXT%" "%REPLACETEXT%" /x /m /l /f "%excludeFile%" /o "%newExcludeFile%"
Thanks!