ASP GetParentFolderName 方法


GetParentFolderName 方法返回指定的路径中最后成分的父文件夹的名称。

语法

  1. FileSystemObject.GetParentFolderName(path)

参数 描述
path 必需的。需返回其父文件夹名称的文件或文件夹的路径。

实例

  1. <%
    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