strAllLines não ofuscantes, strTxtFile, strMatch, objFSO, objFile, strNewText
Const ForReading = 1
Const ForWriting = 2
Ajustar o objNetwork = o CreateObject (“Wscript.Network”)
strUser = objNetwork.UserName
strTxtFile = “C:\Documents and Settings\” & strUser &” \ descanso do trajeto "
strMatch = “TEXTO A SER MODIFICADO”
strNewText = “TEXTO PARA SUBSTITUIR O ORIGINAL”
'Lê a lima de TXT
Ajustar o objFSO = o CreateObject (“Scripting.FileSystemObject”)
Ajustar objFile = objFSO.OpenTextFile (strTxtFile, ForReading)
strAllLines = objFile.ReadAll
objFile.Close
o strNewText = substitui (strAllLines, strMatch, o strNewText)
objFile ajustado = objFSO.OpenTextFile (strTxtFile, ForWriting)
objFile.WriteLine (strNewText)
objFile.Close
|