0

I ran below code in batch file and at the end XML file opened in notepad++ format, now I want to search and replace the content of file and make a copy of the original file... Can you please help?

XCOPY "C:\Program Files (x86)\CAST\7.3\WARS\*.*war" "C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps"
net start "Tomcat7"
net start "CastStorageService2"
TIMEOUT /T 60

REM Open all the static content files
"C:\Program Files (x86)\Notepad++\notepad++.exe" "C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\CAST-AAD\META-INF\context.xml"
Magoo
  • 77,302
  • 8
  • 62
  • 84
jack
  • 1
  • 1
  • I would suggest doing this with powershell. It will make your life easier. – ricky89 Dec 22 '15 at 12:36
  • 3
    @Ajay I don't have understood the task. Please [edit](http://stackoverflow.com/posts/34415941/edit) your question and explain it better. Do you want to copy the file `context.xml` from command line and also opened in Notepad++? Or do you want to replace something in `context.xml`? What is the search string? What is the replace string? What does `context.xml` contain? Should the replace be done in Notepad++ or from within batch file? What about [How can you find and replace text in a file using the Windows command-line environment?](http://stackoverflow.com/questions/60034/) – Mofi Dec 22 '15 at 13:34
  • ok.. in simple I want to search and replace string in context.xml using batch file.. the content in context.xml is [Dashboard Schema] and want to replace by ajay_measure – jack Dec 28 '15 at 07:02
  • any help will be appreciated ! – jack Jan 07 '16 at 08:22

0 Answers0