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
完整的FileSystemObject對象參考手冊