ASP GetExtensionName Method
Complete FileSystemObject object reference manual
The GetExtensionName method returns a string containing the file extension of the last component in a specified path.
Syntax
FileSystemObject.GetExtensionName(path)
| Parameters | Description |
|---|---|
| path | Required. The path of the file whose 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
Complete FileSystemObject object reference manual