ASP GetParentFolderName 方法

GetParentFolderName 方法返回指定的路徑中最後成分的父檔夾的名稱。
語法
FileSystemObject.GetParentFolderName(path)
參數 | 描述 |
---|---|
path | 必需的。需返回其父檔夾名稱的檔或檔夾的路徑。 |
實例
<%
dim fs,p
set fs=Server.CreateObject("Scripting.FileSystemObject")
p=fs.GetParentFolderName("c:\winnt\cursors\3dgarro.cur")
Response.Write(p)
set fs=nothing
%>
輸出:
c:\winnt\cursors
dim fs,p
set fs=Server.CreateObject("Scripting.FileSystemObject")
p=fs.GetParentFolderName("c:\winnt\cursors\3dgarro.cur")
Response.Write(p)
set fs=nothing
%>
輸出:
c:\winnt\cursors
