While true
Do
Wscript.Sleep 1000*15
loop While (Hour(Now)<>00 or Minute(Now)<>10)
call rename()
Wend
Function rename()
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFolder = objFSO.GetFile(Wscript.ScriptFullName).ParentFolder.Path
strFolder = strFolder&"\"
Set objFolder = objFSO.GetFolder(strFolder)
Set colFiles = objFolder.Files
For Each strFile in colFiles
If Lcase(objFSO.GetFileName(strFile)) = "runtime.log" Then
strNewName = Replace(strFile.Name, "runtime.log", "runtime_"&YYYYMMDDHH24MISS()&".log")
objFSO.MoveFile strFile, strFolder & "\" & strNewName
End If
Next
Set objFSO = Nothing
End Function
Function YYYYMMDDHH24MISS()
YYYYMMDDHH24MISS = year(date) & string(2-len(month(date)),"0") & month(date) & string(2-len(day(date)),"0") & day(date)
End Function