ASP GetParentFolderName 方法

定义和用法

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

语法:

  1. FileSystemObject.GetParentFolderName(path)
参数 描述
path 必需的。需返回其父文件夹的文件或文件夹的路径。

实例

  1. <%
  2. dim fs,p
  3. set fs=Server.CreateObject("Scripting.FileSystemObject")
  4. p=fs.GetParentFolderName("c:\winnt\cursors\3dgarro.cur")
  5. Response.Write(p)
  6. set fs=nothing
  7. %>

输出:

  1. c:\winnt\cursors