ASP CopyFile Method
Complete FileSystemObject object reference manual
The CopyFile method copies one or more files from one location to another.
Syntax
FileSystemObject.CopyFile source,destination[,overwrite]
| Parameters | Description |
|---|---|
| source | Required. The file(s) to copy (wildcards can be used). |
| destination | Required. The destination for the copied file(s) (wildcards cannot be used). |
| overwrite | Optional. A Boolean value specifying whether existing files can be overwritten. True allows overwriting existing files; False prevents existing files from being overwritten. The default is True. |
Example
<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.CopyFile "c:\mydocuments\web*.htm","c:\webpages"
set fs=nothing
%>
Complete FileSystemObject object reference manual