GetFileBasename()

  GetFileBasename

Description

GetFileBasename() is used to extract the base portion from a filename.

Call Signature

string GetFileBasename ( string filename )

Return Value

string

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

Argument

string filename:

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

Remarks

The base is the name left after all directory components and the extension have been stripped off. For Example, the base of "demo/readme.txt" would be "readme".

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