Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP GetExtensionName Method

ASP GetExtensionName Method


FileSystemObject Reference 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


FileSystemObject Reference Complete FileSystemObject object reference manual