GetFileExtension

Demonstrates how to extract the extension portion of a file name.

Remarks

This example retrieves the extension of file "irvine.pix", and print it out.

The return value is the extension of the given filename. It will be an empty string if there is no extension.

Code

 local string ext

 ext = GetFileBasename( GetPCIHOME() + "/demo/irvine.pix" )
 
 print ext

Output

pix

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