Phương pháp di chuyển ASP
❮ Tham chiếu đối tượng thư mục hoàn chỉnh
Phương thức Move di chuyển tệp hoặc thư mục đã chỉ định từ vị trí này sang vị trí khác.
Cú pháp
FileObject.Move(destination)
FolderObject.Move(destination)
Parameter | Description |
---|---|
destination | Required. Where to move the file or folder. Wildcard characters are not allowed |
Ví dụ về đối tượng 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
%>
Ví dụ về đối tượng Thư mục
<%
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
%>
❮ Tham chiếu đối tượng thư mục hoàn chỉnh