最新的Web开发教程
 

ASP移动方法


<完整文件夹对象参考

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

句法

FileObject.Move(destination)

FolderObject.Move(destination)

参数 描述
destination 需要。 当移动文件或文件夹。 通配符不允许

例如,对于文件对象

<%
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,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
fo.Move("c:\asp\test")
set fo=nothing
set fs=nothing
%>

<完整文件夹对象参考