Open In App

ASP MoveFolder Method

Last Updated : 23 Feb, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

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. 

ASP




<%
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

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads