Option Explicit Const cMaxLines = 1000000 Const cMaxSize = 1000 Const cstrHistoryFile = "C:\FockeTools\MbProbe\MBProbeHistoryLog.txt" Const cstrEventFile = "C:\FockeTools\MbProbe\MBProbeEventLog.txt" Const cstrOldHistoryFile = "C:\FockeTools\MbProbe\MBProbeHistoryLog.old" Const cstrOldEventFile = "C:\FockeTools\MbProbe\MBProbeEventLog.old" Const cstrStdHistoryFile = "C:\FockeTools\MbProbe\MBProbeHistoryLog.std" Dim wshshell,fso, Textfile, Lines(1000000),i,StartVal,EndVal Set wshshell = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") If fso.FileExists(cstrHistoryFile) Then If fso.FileExists(cstrOldHistoryFile) Then Call fso.DeleteFile(cstrOldHistoryFile,True) End If Call fso.MoveFile(cstrHistoryFile, cstrOldHistoryFile) Call fso.CopyFile(cstrStdHistoryFile, cstrHistoryFile) End If If fso.FileExists(cstrEventFile) Then If fso.FileExists(cstrOldEventFile) Then Call fso.DeleteFile(cstrOldEventFile,True) End If Call fso.MoveFile(cstrEventFile, cstrOldEventFile) End If WScript.Sleep(120000) wshshell.Run("MbProbe.exe")