Atrybut ParentFolder w ASP
Definicja i użycie
Atrybut ParentFolder zwraca obiekt folder dla określonego pliku lub katalogu.
Sintaktyka:
FileObject.ParentFolder FolderObject.ParentFolder
Przykład
Przykład dla obiektu File
<% zmień fs,f ustaw fs=Server.CreateObject("Scripting.FileSystemObject") ustaw f=fs.GetFile("d:\asp\test\test.asp") Response.Write("The file test.asp is in the folder: ") Response.Write("}}")f.ParentFolder) ustaw f=nothing ustaw fs=nothing %>
Wynik:
The file test.asp is in the folder: D:\asp\test
Przykład dla obiektu Folder
<% zmień fs,fo ustaw fs=Server.CreateObject("Scripting.FileSystemObject") ustaw fo=fs.GetFolder("d:\asp\test") Response.Write("The folder test is in the folder: ") Response.Write("}}")fo.ParentFolder) ustaw fo=nothing ustaw fs=nothing %>
Wynik:
Test folderu znajduje się w folderze: D:\asp