npocmaka / batch.scripts

batch script utils and examples by npocmaka -
https://www.linkedin.com/in/npocmaka/
MIT License
1.08k stars 873 forks source link

how do you replace multiple strings with replacer.bat ? #50

Open maravento opened 2 years ago

maravento commented 2 years ago

Is there a way to replace multiple strings with a loop using replacer.bat?

call replacer.bat "content.txt" "foo" "bar" "xyz abc" "bla fart"
call replacer.bat "content.txt" "foo\bar" "xyz\abc" "bla\fart"

These commands don't work, the help isn't very helpful, and executing a command for each replacement is not something very optimized