ASP MoveMethod
Complete Folder Object Reference Manual
The Move method moves a specified file or folder from one location to another.
Note:Applying the Move method to a File or Folder yields exactly the same result as performing the operation with FileSystemObject.MoveFile or FileSystemObject.MoveFolder. However, note that the FileSystemObject.MoveFile or FileSystemObject.MoveFolder methods can move multiple files or folders.
Syntax
FileObject.Move(destination)
FolderObject.Move(destination)
FolderObject.Move(destination)
| Parameters | Description |
|---|---|
| destination | Required. The destination where the file or folder is to be moved. Wildcard characters are not allowed. |
Example for the File Object
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.GetFile("c:\test.txt")
f.Move("c:\test\test.txt")
set f=nothing
set fs=nothing
%>
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.GetFile("c:\test.txt")
f.Move("c:\test\test.txt")
set f=nothing
set fs=nothing
%>
Example for the Folder Object
<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
fo.Move("c:\asp\test")
set fo=nothing
set fs=nothing
%>
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
fo.Move("c:\asp\test")
set fo=nothing
set fs=nothing
%>
Complete Folder Object Reference Manual Other Extensions