Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Find and Replace Text in a Text FileContent of Find and Replace Text in a Text File.vbsMD5 Hash: A2EB8CFABB352416838938326C56B4D5 |
||
Const ForReading = 1
Const ForWriting = 2 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("C:\Scripts\Text.txt", ForReading) strText = objFile.ReadAll objFile.Close strNewText = Replace(strText, "Jim ", "James ") Set objFile = objFSO.OpenTextFile("C:\Scripts\Text.txt", ForWriting) objFile.WriteLine strNewText objFile.Close | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |