Version: 2.5
Moves a file, or a directory and its contents, to a specified location.
The MoveRecord method is used to move a file or a directory and its contents from
a source location to a destination location.
In effect, the file or directory is deleted from its current location.
If you want the file or directory to remain at the source location,
you can use the CopyRecord method to relocate a copy to another location.
The default is not to overwrite any file or directory at the destination location
and to update hypertext links in the files being moved,
unless you specify otherwise in each case.
Note that the ParentURL property is not automatically updated.
You will need to close the Record and re-open it with the new URL.
Likewise, you should close and re-open the Recordset object from which the
Record was obtained to update the location.
This method will return a string value that is usually the value of the
Destination parameter, but the exact value that is returned is provider-dependent.
There are six optional parameters.
MoveRecordOptionsEnum Constants
Constant | Value | Description |
---|---|---|
adMoveAllowEmulation | 4 | If the attempt to move the records failed, because the Destination is on a different server or uses a different provider than the Source, then the Source provider can attempt to simulate the move by using upload, download, and delete operations. |
adMoveDontUpdateLinks | 2 | Does not update links of source Record |
adMoveOverWrite | 1 | Allows files and directories at destination to be overwritten |
adMoveUnspecified | -1 | Default, does not allow overwrite but does update links |
objRecord.MoveRecord strSourceURL, strDestinationURL, , , adMoveOverWrite
...
objRecord.Close
...
objRecord.Open strDestinationURL