File.Copy Method (VB6) |
Yes
oFileObj.Copy Destination [, OverwriteFiles]
oFileObj
Use: Required
Data Type: File object
Any object variable returning a File object.
Destination
Use: Required
Data Type: String
The path and optionally the filename of the copied file.
OverwriteFiles
Use: Optional
Data Type: Boolean
True if the copy operation can overwrite an existing file; False otherwise.
Copies the file represented by oFileObj to another location.
Wildcard characters can't be used in Destination.
If the Destination path is set to read-only, the Copy method fails regardless of the Overwrite setting.
If OverwriteFiles is False and the file exists in Destination, a trappable error, runtime error 58, "File Already Exists," is generated.
If the user has adequate rights, Destination can be a network path or share name. For example:
Copy "\NTSERV1d$RootTwo" Copy "\NTSERV1RootTest"