Add a reference to the ms scripting runtime by choosing the menu options Project -> References -> select from the list Microsoft Scripting Runtime.
You can rename a file using the following code:
Dim fsFilesystem As Scripting.FileSystemObject
Set fsFilesystem = New Scripting.FileSystemObject
fsFilesystem.MoveFile "c:\test.txt", "c:\success.txt"
Set fsFilesystem = Nothing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.