Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Const ForReading = 1
- Const ForWriting = 2
- Dim objFSO 'File System Object
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- Dim objInputTS 'Text Stream Object
- Set objInputTS = objFSO.OpenTextFile("c:\USMT\log.txt", ForReading, False)
- Dim objOutputTS 'Text Stream Object
- Do Until objInputTS.AtEndOfStream
- Dim strLine
- strLine = objInputTS.ReadLine()
- If (Left(strLine, 08) = "complete") Then
- If objOutputTS = Nothing Then
- Set objOutputTS = objFSO.OpenTextFile("c:\USMT\output.txt", ForWriting, True)
- End If
- objOutputTS.WriteLine(Mid(strLine, 08))
- Loop
- If objOuputTS <> Nothing Then objOutputTS.Close()
- objInputTS.Close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement