FileSystemObject.GetExtensionName()

JScript3.0+Syntax

							filesystemobject.GetExtensionName(path)
						

Description

The GetExtensionName() method is used to get the file extension name for a specified file. This method takes path as its only parameter, which represents the full path to the file.

Example

Listing 9.85 shows how the GetExtensionName() method is used. An instance of the FileSystemObject is created and then used to get the extension name of the specified file type.

Listing 9.85 Example of GetExtensionName()
 <html> <body> <script language="JScript"> <!-- Hide // gets the extension name for the file and informs the user // of the results function getExt() { var myObject, ext; // Creates an instance of the FileSystemObject myObject = new ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.