mmfert.blogg.se

Datacrow find and replace
Datacrow find and replace















Use -O -P -A to show pure replaced result: (add -C if you don't want color)įor /f "tokens=*" %a in (Blocked.twml) do -p Directory.twml -x "%a" -o "" -OPA.Use -O to just show matched/replaced command result:įor /f "tokens=*" %a in (Blocked.twml) do -p Directory.twml -x "%a" -o "" -O.If you want just to display the replaced line, without replacing file: You can copy Directory.twml to a tmp file and use that tmp file in the above command.Safer way if Blocked.twml has whitespace lines and escape them:įor /f "tokens=*" %a in ('msr -p Blocked.twml -t "\w+" -PAC') do -p Directory.twml -i -x "%a" -o "" -RĢ.If Directory.twml shouldn't be replaced, use following methods according to your purposes like: Simply 1 command line, using msr.exe to replace text in Directory.twml if it's replaceable:įor /f "tokens=*" %a in (Blocked.twml) do -p Directory.twml -i -x "%a" -o "" -R.Its output looked like this for me 13:22:14.16 twml says: this is a testġ3:22:20.37 twml says: this is a word test

#DATACROW FIND AND REPLACE HOW TO#

If Directory.twml contains anything in Blocked.twml replace with but i cant figure out how to do itįor /f "delims=" %%A in (Directory.twml) do (įor /f "delims=" %%B in (blocked.twml) do set "line=!line: %%B = !"

datacrow find and replace

I already can use Findstr to look in the file and see if the text exists but thats as far as i can get, I need to not check for a set word but check the list of words in the file Blocked.twml findstr /i "bad" nulĪlso i can remove the word from the file but i want to replace it not just remove findstr /i /v /c:"%text%" Directory.twml > "Directory.twmll" 2>nulīut again this is a set text to look for not from what is in a file as a list What i want Directory.twml to say look like is 11:38:38.90 Twml Has joined the chat.ġ1:38:42.96 Twml says: line two I need to use Batch to check file Directory.twml to see if it contains any words from file blocked.twml and if it does replace with ĭirectory.twml 11:38:38.90 Twml Has joined the chat.ġ1:38:42.96 Twml says: line bad twoġ1:38:50.16 Twml says: you get the idea hereġ1:38:52.35 Twml Has logged off.















Datacrow find and replace