ASP CopyFile 方法

定义和用法

CopyFile 方法从一个位置向另一个位置复制一个或多个文件。

语法:

FileSystemObject.CopyFile source,destination[,overwrite]
参数 描述
source 必需的。要复制的文件(可以使用通配符)。
destination 必需的。复制文件的目标位置(不能使用通配符)。
overwrite 可选的。规定是否可以覆盖现有的文件。True 允许覆盖现有文件,False 可以防止现有文件被覆盖。默认为 True。

实例

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