Ciemnawy strAllLines, strTxtFile, strMatch, objFSO, objFile, strNewText
Const ForReading = (1)
Const ForWriting = 2
Ustalony objNetwork = CreateObject ("Wscript.Network")
strUser = objNetwork.UserName
strTxtFile = "C:\Documents and Settings\" & strUser &" \ Odpoczynek the Ścieżka "
strMatch = "TEKST"
strNewText = "TEKST ORYGINAŁ"
'Czytać the TXT kartoteka
Ustalony objFSO = CreateObject ("Scripting.FileSystemObject")
Ustalony objFile = objFSO.OpenTextFile (strTxtFile, ForReading)
strAllLines = objFile.ReadAll
objFile.Close
strNewText = Zamieniać (strAllLines, strMatch, strNewText)
Ustalony objFile = objFSO.OpenTextFile (strTxtFile, ForWriting)
objFile.WriteLine (strNewText)
objFile.Close
|