ASP GetBaseName 方法


GetBaseName 方法返回指定路径中的文件或文件夹的基准名称。

语法

  1. FileSystemObject.GetBaseName(path)

参数 描述
path 必需的。需被返回基准名称的文件或文件夹的路径。

实例

  1. <%
    dim fs
    set fs=Server.CreateObject("Scripting.FileSystemObject")
    Response.Write(fs.GetBaseName("c:\winnt\cursors\3dgarro.cur"))
    set fs=nothing
    %>

    输出:

    3dgarro