GetFileExtension()

  GetFileExtension

Description

GetFileExtension() is used to extract the extension portion from a filename.

Call Signature

string GetFileExtension ( string filename )

Return Value

string

The extension of the file is returned. An empty string is returned if there is no extension.

Argument

string filename:

The name of the file from which the extension should be extracted.

Remarks

The extension is the part after the period, such as "txt" in "readme.txt".

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.