ASP CopyFileMethod


FileSystemObject 对象参考手册Complete FileSystemObject Object Reference

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 to copy (wildcards allowed).
destination Required. The destination where the file is to be copied (wildcards not allowed).
overwrite Optional. Boolean value that specifies whether existing files can be overwritten. True allows overwriting existing files, False prevents existing files from being overwritten. Default is True.


Examples

<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.CopyFile "c:\mydocuments\web\*.htm","c:\webpages\"
set fs=nothing
%>


FileSystemObject 对象参考手册Complete FileSystemObject Object Reference Other Extensions