ASP Move 方法


❮ 完整的 Folder 文件夹对象参考

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

语法

FileObject.Move(destination)

FolderObject.Move(destination)

参数 描述
destination 必需的。移动文件/文件夹的目的地。不允许使用通配符。

针对 File 对象的例子

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

针对 Folder 对象的例子

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

❮ 完整的 Folder 文件夹对象参考