Latest web development tutorials

ASP CopyFile Method

FileSystemObject Object Reference Complete FileSystemObject Object Reference

CopyFile method from one location to copy one or more files to another location.

grammar

FileSystemObject.CopyFile source,destination[,overwrite]

参数 描述
source 必需的。要拷贝的文件(可使用通配符)。
destination 必需的。拷贝文件的目的地(不能使用通配符)。
overwrite 可选的。布尔值,规定是否可覆盖已有的文件。True 允许覆盖已有文件,False 防止已有文件被覆盖。默认为 True 。


Examples

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


FileSystemObject Object Reference Complete FileSystemObject Object Reference