Metoda Move w ASP
Definicja i użycie
Metoda Move przenosi określony plik lub katalog z jednego miejsca do innego.
Schemat:
FileObject.Move(destination) FolderObject.Move(destination)
Parametr | Opis |
---|---|
destination | Wymagane. Cel przenoszenia pliku/katalogu. Nie można używać znaków wieloznacznych. |
Przykład
Przykład dla obiektu File
<% dim fs,f ustaw fs=Server.CreateObject("Scripting.FileSystemObject") Set f=fs.GetFile("d:\test.txt") f.Move("d:\test\test.txt") set f=nothing ustaw fs=nothing %>
Przykład dla obiektu Folder
<% dim fs,fo ustaw fs=Server.CreateObject("Scripting.FileSystemObject") ustaw fo=fs.GetFolder("d:\test") fo.Move("d:\asp\test") ustaw fo=nothing ustaw fs=nothing %>