The current filename and optional path
The new filename and optional path
Renames a disk file or folder
newpath must not already exist, or an
error will be generated.
oldpath must exist; the
Rename procedure isn’t able to
create a new file or directory.
When renaming a file or folder, both
oldpath should include a path to the same
folder, or the function will move the file or directory. For
instance, the statement:
renames the Graphics folder to Images and moves it so that it becomes a subdirectory of the current directory.
Path information included in
oldpath can take the form of the local
system’s path or the UNC path. The local system path
can be either a fully qualified path or a relative path from the
oldpath can be on different drives, but if
they are, Rename cannot both move the files and
oldpath cannot include the wildcard
You cannot use the Rename procedure with a file that is already open.
The Rename procedure can be used to move a file
from one folder to another and, optionally, to change the
file’s name at the same time. If the folder
newname exists and is
different from that stated in
oldname, the file will be moved to the ...