TUTORIAL后端与 Web 服务FETCHED

ASP GetExtensionName 方法

ASP GetExtensionName 方法 完整的 FileSystemObject 对象参考手册 GetExtensionName 方法返回包含指定路径中最后成分的文件扩展名的字符串。 语法 FileSystemObject.GetExtensionName(path) 参数 描述 path 必需的。需返回文件扩展名的文件的路径。 实例 <%..

更新于 2026/7/16

教程详情页默认 noindex。

ASP GetExtensionName 方法


FileSystemObject 对象参考手册 完整的 FileSystemObject 对象参考手册

GetExtensionName 方法返回包含指定路径中最后成分的文件扩展名的字符串。

语法

FileSystemObject.GetExtensionName(path)

参数 描述
path 必需的。需返回文件扩展名的文件的路径。

实例

<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetExtensionName("c:\test\test.htm"))
set fs=nothing
%>

输出:

htm


FileSystemObject 对象参考手册 完整的 FileSystemObject 对象参考手册