Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Const ForReading = 1
  2. Const ForWriting = 2
  3. Dim objFSO 'File System Object
  4. Set objFSO = CreateObject("Scripting.FileSystemObject")
  5. Dim objInputTS 'Text Stream Object
  6. Set objInputTS = objFSO.OpenTextFile("c:\USMT\log.txt", ForReading, False)
  7. Dim objOutputTS 'Text Stream Object
  8.  
  9. Do Until objInputTS.AtEndOfStream
  10.     Dim strLine
  11.     strLine = objInputTS.ReadLine()
  12.     If (Left(strLine, 08) = "complete") Then
  13.     If objOutputTS = Nothing Then
  14.         Set objOutputTS = objFSO.OpenTextFile("c:\USMT\output.txt", ForWriting, True)
  15.     End If
  16.     objOutputTS.WriteLine(Mid(strLine, 08))
  17. Loop
  18.  
  19. If objOuputTS <> Nothing Then objOutputTS.Close()
  20. objInputTS.Close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement