|
-
Jul 15th, 2005, 11:51 AM
#1
Thread Starter
Junior Member
Replace Text
Hi there,
Can anyone explain how to run a replace text string and amend a file in vbscript.
Example replace all "test" in txt file log.txt
-
Jul 16th, 2005, 04:40 AM
#2
Addicted Member
Re: Replace Text
hi
Scripting.FileSystemObject has the full role in this process. this link will provide you details abt the object.
you have to read each line of the source file. replace the "test" in every line using replace() in vbscript. and write it to another file, say a temp file. after full copy close the source and temp files. then delete the original file and rename the temp file to the original filename.
--Kishore...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|