Guest User

Untitled

a guest
May 14th, 2020
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1.  
  2.  
  3. Const ForReading = 1
  4. Const ForWriting = 2
  5. strFileName = Wscript.Arguments(0)
  6. strOldText = Wscript.Arguments(1)
  7. strNewText = Wscript.Arguments(2)
  8. Set objFSO = CreateObject("Scripting.FileSystemObject")
  9. Set objFile = objFSO.OpenTextFile(strFileName, ForReading)
  10. strText = objFile.ReadAll
  11. objFile.Close
  12. strNewText = Replace(strText, strOldText, strNewText)
  13. Set objFile = objFSO.OpenTextFile(strFileName, ForWriting)
  14. objFile.Write strNewText
  15. objFile.Close
Advertisement
Add Comment
Please, Sign In to add comment