Hi,
I've found this utility a while ago and it saved me a lot of time. The only thing i'm missing is the option to reverse the filename.
Could you add this option?
Function Rename(OldFile)
'Create variables
Dim sName, fso, fol
' Create the filesystem object
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
' Get the file extension, path and filename
sExtension = fso.GetExtensionName(OldFile)
sPath = fso.GetParentFolderName(OldFile)
sName = fso.GetFileName (OldFile)
' Strip the extension
sName = Replace(sName, "." & sExtension, "")
' Reverse the filename
NewFile = StrReverse(sName) & "." & sExtension
' Combine reversed filename with extension
NewFile = sPath & "\" & NewFile
' Rename the old filename to the new filename
fso.MoveFile OldFile, NewFile
End Function
' Get filename from commandline arguments
FileName = WScript.Arguments.Item(0)
' Call the rename function
Rename (FileName)
Thanks,
Ivo