I have a button that swaps lastname, firstname and i'm trying to convert it to a vbscript button either as a stand alone or to be inserted into the Title Case Plus ...the first example is what i'm using which works and the second example is what i'm trying to convert it to.
This is what i'm trying to convert
Rename REGEXP PATTERN="^(\w+), *([\w \.]+)[ ]+-[ ]*(.*)" TO="\2 \1 - \3" AUTORENAME
@nodeselect
this is whats not working as a stand alone button
RENAME FROM="*" TO="*"
@script vbscript
option explicit
Function Rename_GetNewName ( strFileName, strFullPath, fIsFolder, strOldName, ByRef strNewName )
re.Pattern = "^(\w+), *([\w \.]+)[ ]+-[ ]*(.*)"
strNewName = re.Replace(strNewName, "$2 $1 - $3")
End Function
for title case plus it strips the extension i was trying this and its not working either
' Swap Last Name, First Name
if fSwap = True then
re.Pattern = "^(\w+), *([\w \.]+)[ ]+-[ ]*(.*)"
strNewName = re.Replace(strNewName, "$2 $1 - $3")
end if
any ideas?