ASP Move 方法

定义和用法

Move 方法把指定的文件或文件夹从一个位置移动到另一个位置。

语法:

FileObject.Move(destination)
FolderObject.Move(destination)
参数 描述
destination dangadi. 目的 di 移动文件/文件夹。不允许使用通配符。

实例

gaici File

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.GetFile("d:\test.txt")
f.Move("d:\test\test.txt")
set f=nothing
set fs=nothing
%>

gaici Folder

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("d:\test")
fo.Move("d:\asp\test")
set fo=nothing
set fs=nothing
%>