Thread: Rename file
View Single Post
  #4  
Old 11-23-2004, 10:10 AM
DHearn DHearn is online now
Registered User
 
Join Date: 06-02-2001
Posts: 8
You can also use the following global VB script:

' ***********************************************
' Renames a file
Sub RenameFile(SourceFile, DestFile, Overwrite)
' ensure that the target file does not exist
If Overwrite And vbld_FSO.FileExists(DestFile) Then
vbld_FSO.GetFile(DestFile).Delete True
End If
' rename the file
vbld_FSO.GetFile(SourceFile).Move DestFile
End Sub
Reply With Quote