Open In App

ASP MoveFile Method

Improve
Improve
Like Article
Like
Save
Share
Report

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

Syntax 

FileSystemObject.MoveFile 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 files to be moved.

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

Example: Below code illustrates the ASP MoveFile Method. 

ASP




<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.MoveFile "C:\Folder1\A\A.txt","C:\Folder2\B\"
response.write("The location of the file is changed")
set fs=nothing
%>


Output:

The location of the file is changed

Last Updated : 23 Feb, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads