Dear Friends,
Scrip is not working properly
First i need to find PID=“1234-3455-6789-9900"
I need to replace the PID =” " on other file
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
parameter “Content” = "{following texts of firsts “PID=” of lines whose (it starts with “PID=”) of file “C:\Software\config.cfg”}"
parameter “filename” = "{pathname of file (“C:\Software\config1.xml”)}"
parameter “textToReplace” = "PID="
parameter “newText” = "PID={parameter “Content”}"
appendfile {concatenation “%0d%0a” of ( if (it contains (parameter “textToReplace”)) then ((preceding text of first (parameter “textToReplace”) of it) & (parameter “newText”) & (following text of first (parameter “textToReplace”) of it) ) else it ) of lines of file (parameter “filename”)}
move “{parameter “filename”}” “{parameter “filename”}.bak”
// replace with the new file
move __appendfile "{parameter “filename”}"
delete “C:\Software\config1.xml.bak”
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
so any help would be greatly appreciated.