ASP GetExtensionName Method

Definition and Usage

The GetExtensionName method returns a string that contains the file extension of the last component in the specified path.

Syntax:

FileSystemObject.GetExtensionName(path)
parameter description
path required. It returns the path of a file with the file extension.

instance

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

Output:

htm