ASP GetExtensionNameMethod
Complete FileSystemObject Object Reference Manual
The GetExtensionName method returns a string containing the file extension of the last component in the specified path.
Syntax
FileSystemObject.GetExtensionName(path)
| Parameters | Description |
|---|---|
| path | Required. The path of the file whose file extension is to be returned. |
Example
<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetExtensionName("c:\test\test.htm"))
set fs=nothing
%>
Output:
htm
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetExtensionName("c:\test\test.htm"))
set fs=nothing
%>
Output:
htm
Complete FileSystemObject Object Reference Manual Other Extensions