Add leading zeroes

No strong reason, it just seemed clearer and only a couple more characters. One less concept and type of symbol in an already complex regexp.

[quote="leo"]This version may work in Opus 10, although I have only checked in 11:

[code]@script vbscript
Option Explicit

Dim re
Set re = New RegExp
re.IgnoreCase = True
re.Pattern = "^(\d\d\d\d)-(\d\d?)-(\d\d?)([^\d]*)$"

Function Rename_GetNewName ( strFileName, strFullPath, fIsFolder, strOldName, ByRef strNewName )
Dim matches, d, m, y, r
Set matches = re.Execute(strNewName)
If (matches.Count > 0) Then
y = matches(0).SubMatches.Item(0)
m = matches(0).SubMatches.Item(1)
d = matches(0).SubMatches.Item(2)
r = matches(0).SubMatches.Item(3)
m = UCase(MonthName(m,True))
If (Len(d) = 1) Then d = "0" & d
strNewName = y & "-" & m & "-" & d & r
End If
End Function[/code][/quote]

It works - many thanks