Something like this.
Not tested but it looks like it should work just fine.

Code:

Break on
;
$sourcefile = "c:\sourcexmlfile.xml"
$newfile = "c:\newxmlfile.xml"
;
$rc = Open (1, $sourcefile, 2)
$rc = Open (2, $newfile, 5)
;
$line = ReadLine (1)
If InStr ($line, "C:\windows\folderName\")
$line = Split($line, "C:\windows\folderName\")
$line = Join ($line, "G:\NEWfolderName\")
$rc = WriteLine (2, $line + @CRLF)
Else
$rc = WriteLine (2, $line + @CRLF)
EndIf
;
$rc = Close(1)
$rc = Close(2)



[edit]
Hmmmm.....
There could be an issue with paths that have C:\windows\folderName\ in it and should not be changed.
Depends on your situation and if all the lines that have C:\windows\folderName\ in it should be changed.
[/edit]


Edited by Mart (2006-10-17 09:42 AM)