computing
  • 2

Edit Xml Using a Bat Or Cmd File

  • 2

i have a word document that i need to edit a settings thats hidden

so firstly i rename extension to .zip or .rar using cmd line

extract

this gives you the xml contents of the word document

i then rename seetings.xml to settings.txt

i then want to replace a unique filepath with in the settings.txt with a path thats has been made by user input before this process

save rename, repack then rename etc

im having trouble searching the settings.txt and replacing

any ideas

thanks in advance

Share

1 Answer

  1. for /f “tokens=*” %%j in (‘type settings.txt ^| find “value”‘) do echo %%j

    This is in a batchfile, if you want run this at the command prompt replace the double ‘%%’ with a single one.

    So:
    for /f “tokens=*” %j in (‘type settings.txt ^| find “value”‘) do echo %j

    Happy is ONE who says I am an OttoMAN.

    • 0