当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP CopyFolder 方法
The CopyFolder method copies one or more folders from one location to another.
CopyFolder的作用是将一个或多个文件夹从本地复制到其他地方。
FileSystemObject.CopyFolder source,destination[,overwrite] |
Parameter参数 | Description描述 |
---|---|
source | Required. The folder or folders to copy (wildcards can be used) 必要参数。指明要复制的文件夹(可以使用通配符) |
destination | Required. Where to copy the folder or folders (wildcards cannot be used) 必要参数。指明文件夹复制的具体位置(不可以使用通配符) |
overwrite | Optional. A Boolean value that indicates whether an existing folder can be overwritten. True allows existing folders to be overwritten and False prevents existing folders from being overwritten. Default is True 可选组件。它是一个逻辑值,用于设定是否拥有覆盖现存文件夹的权限。如果值为“true真”,则可以覆盖现存文件夹;如果是“false假”,则不可以覆盖。默认时为:true真。 |
<% 'copy all the folders in c:mydocumentsweb 'to the folder c:webpages dim fs set fs=Server.CreateObject("Scripting.FileSystemObject") fs.CopyFolder "c:mydocumentsweb*","c:webpages" set fs=nothing %> <% 'copy only the folder test from c:mydocumentsweb 'to the folder c:webpages dim fs set fs=Server.CreateObject("Scripting.FileSystemObject") fs.CopyFolder "c:mydocumentswebtest","c:webpages" set fs=nothing %> |