| |
brettule
Posts: 1
Score: 0
Joined: 5/28/2008
Status: offline
|
I need to loop this script to perform the replace on all (*.txt) files in the C:\VPN folder, can anyone help? Const ForReading = 1 Const ForWriting = 2 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("C:\VPN\profile1.txt", ForReading) strText = objFile.ReadAll objFile.Close strNewText = Replace(strText, "192.168.1.1", "10.254.254.1") Set objFile = objFSO.OpenTextFile("C:\VPN\profile1.txt", ForWriting) objFile.WriteLine strNewText objFile.Close
|
|