Open In App

ASP CopyFile Method

The ASP CopyFile Method is used to copying one or more files from one place to another place. It is a predefined method of the FileSystem Object.

Syntax:



FileSystemObject.CopyFile source,destination[,overwrite] 

Parameter Values:

Example Code: Below example demonstrates the CopyFile Method. 






<%
dim gfg
set gfg=Server.CreateObject("Scripting.FileSystemObject")
gfg.CopyFile "c:\Folder1\A\*.txt","c:\Folder2\"
response.write("File is Copied")
set gfg=nothing
%>

Output:

File is Copied 
Article Tags :