Open In App

ASP CopyFolder Method

The ASP CopyFolder Method is used to copying one or more folders from source to destination. It is a predefined method of the FileSystem Object. 

Syntax:



FileSystemObject.CopyFolder source,destination[,overwrite] 

Parameter Values:

Example: Below example demonstrates the CopyFolder Method.






<%
'copy all the folders in c:\myfolders\hello
'to the folder c:\pictures
  
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.CopyFolder "c:\myfolders\hello\*","c:\pictures\"
response.write("Folder Copied")
set fs=nothing
%>

Output:

Folder Copied
Article Tags :