Data Type: File object
A File object.
Data Type: String
The path to the location where the file is to be moved.
Moves a file from one folder to another.
The file represented by
oFileObj must not be open or an error
Wildcard characters can’t be used in
Destination can be either an
absolute or a relative path.
If a fatal system error occurs during the execution of this method (like a power failure), the worst that can happen is that the file is copied to the destination but not removed from the source. There are no rollback capabilities built into the File.Move method; however, because the copy part of this two-stage process is executed first, the file can’t be lost.
If a folder or a file by the same name already exists in
destination, the method generates
runtime error 58, “File exists.” To prevent this, you can use
the FileSystemObject’s FileExists and GetAbsolutePath methods
prior to calling the Move method.
Unlike the FileSystemObject’s MoveFile method, which
accepts wildcard characters in the path parameter and can
therefore move multiple files, the Move method moves only the
single file represented by
As a result of the Move method, the Files collection
object originally containing
oFileObj is automatically updated, the file is removed from it, and the collection count is reduced by one. You shouldn’t try ...