Open In App

ASP MoveFolder Method

The ASP MoveFolder Method is used to move one or more folders from one place to another place. It is an in-built method of the FileSystem Object. 

Syntax:



FileSystemObject.MoveFolder source,destination

Parameter Values:

source: It is a required attribute. It contains a Character string file that can include wildcard characters, for one or more folders to be moved.

destination: It is also a required attribute. It specifies a character string value Where to move folder files or folders. It does not include wildcard characters.



Example Code: Below code illustrates the ASP MoveFolder Method. 




<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.MoveFolder "C:\Folder1\A","C:\Folder2\B\"
set fs=nothing
%>

Output:

Before:

Source:
C:\Folder1\A
Destination:
C:\Folder2\B

After:

Source:
C:\Folder1
Destination:
C:\Folder2\B\A
Article Tags :