The spec looks good. As mentioned, I use the batch redirect (>filename) to log filesize (ex. DIR __*.yaa) and operation time (TIMETHIS.EXE). Of course, it would be great to save a few minutes using the calculator if the ratio % and realtime x were output to CON and/or logfile.
I use "%~z1" in the encoding batch file to output the new file's filesize to a log. Same idea.
The following VBS (Windows Script) file will look at any text files in the same directory for TimeThis' "Elapsed Time" entries and write them (in seconds format) all to a new text file (e.g.: "la.txt" > "la.txt.times.txt"). It's an easy way to scrape TimeThis times from a log created using a redirect. I'm not sure whether it may be of any use, but here it is anyway.
timethis.vbs:
Dim objFSO, objFolder, objFile
Dim objStream, objOutput, strProcessed
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("./")
For Each objFile in objFolder.Files
If GetExtension(objFile.Name) = ".txt" Then
Set objStream = objFile.OpenAsTextStream(1)
strProcessed = ProcessFile(objStream.ReadAll)
objStream.Close
If strProcessed > "" Then
Set objOutput = objFSO.OpenTextFile(objFile.Name & ".times.txt", 2, True)
objOutput.Write strProcessed
objOutput.Close
End If
End If
Next
Set objOutput = Nothing
Set objStream = Nothing
Set objFile = Nothing
Set objFSO = Nothing
Function ProcessFile(ByVal strString)
Dim objRegExp, objMatch, colMatches
Dim strLine, i, arrPart, sngSeconds
Set objRegExp = New RegExp
objRegExp.Pattern = "TimeThis : Elapsed Time : (\d+:\d+:\d+\.*\d*)"
objRegExp.IgnoreCase = True
objRegExp.Global = True
Set colMatches = objRegExp.Execute(strString)
For Each objMatch in colMatches
arrPart = Split(objMatch.SubMatches(0), ":")
sngSeconds = (arrPart(0) * 60 * 60) + (arrPart(1) * 60) + arrPart(2)
strLine = strLine & CStr(sngSeconds) & vbCrLf
Next
Set objRegExp = Nothing
ProcessFile = strLine
End Function
Function GetExtension(ByVal strFile)
GetExtension = LCase(Mid(strFile, InstrRev(strFile, ".")))
End Function