QTP Script to Find and Replace Text in a Text File
Const ForReading = 1
Const ForWriting = 2
Set fso = CreateObject( "Scripting.FileSystemObject" )
Set textFile = fso.OpenTextFile( "C:\qtp.txt", ForReading )
Text = textFile.ReadAll
textFile.Close
NewText = Replace( Text, "abc", "QTP")
Set textFile = fso.OpenTextFile( "C:\qtp.txt", ForWriting )
textFile.WriteLine NewText
QTP Script to Find and Replace Text in a Text File-VB Script to Find and Replace Text in a Text File
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment