What is the easiest way to rename a folder.
Essentially what I am doing is unzipping a zip file into a temp folder, waiting for it to complete, and then renaming it to the live directory.
Printable View
What is the easiest way to rename a folder.
Essentially what I am doing is unzipping a zip file into a temp folder, waiting for it to complete, and then renaming it to the live directory.
use the VB name
Code:Dim OldName, NewName
OldName = "OLDFILE": NewName = "NEWFILE" ' Define file names.
Name OldName As NewName ' Rename file.
OldName = "C:\MYDIR\OLDFILE": NewName = "C:\YOURDIR\NEWFILE"
Name OldName As NewName ' Move and rename file.
So it works on folders too? Nice!