Guest Marauder2k Posted August 24, 2004 Posted August 24, 2004 I have a standard text file which I'd like to search for a string, replace it, and save the file again. The main part I'm having trouble with is the filewrite command. How can I get it to actually replace the string instead of just adding the new changed string to the end of the file? This is what I have so far: $file = FileOpen("setup1.txt", 1) $aaa=StringReplace("%programfiles%", "programfiles", @programfilesdir, 0, 0) FILEWRITE($file, $aaa) FILECLOSE($file) Thanks
Guest Marauder2k Posted August 24, 2004 Posted August 24, 2004 Works perfect. Thankyou very very much
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now