Во-первых, я не уверен, правильно ли я понял вопрос.
Может быть так:
Option Explicit
Const SOURCE_PATH = "C:\source.csv"
Const DEST_PATH = "C:\destination.csv"
Dim oReg, oFso
Set oReg = New RegExp
oReg.IgnoreCase = True
oReg.Global = True
oReg.Pattern = "\b((1[0-2]|[1-9]):[0-5][0-9]:[0-5][0-9] [AP]M)\b"
Function cb_MilTime(a, b, c, d, e)
cb_MilTime = FormatDateTime(CDate(b), 4)
'cb_MilTime = Replace(cb_MilTime, ":", "") 'need seperator?
End Function
Set oFso = CreateObject("Scripting.FileSystemObject")
If oFso.FileExists(SOURCE_PATH) Then
oFso.OpenTextFile(DEST_PATH, 2, True).Write(oReg.Replace(_
oFso.OpenTextFile(SOURCE_PATH).ReadAll(), GetRef("cb_MilTime")))
Else
Err.Raise 8, "Source path does not exists"
End If
WScript.Echo "File Saved to "& DEST_PATH
Set oFso = Nothing
Set oReg = Nothing