Latest web development tutorials

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對象參考手冊