9.2.1 Basename_Shell_Utils Procedure

The Basename_Shell_Utils procedure strips off the path prefix and optionally the suffix from a given pathname. Note that the suffix behavior is slightly different from the standard basename function.

Calling syntax:

Character = Basename(Filename, Suffix)

Input variables:

 Filename  The Filename to be modified.
 Suffix_Strip  Toggle for removing suffix. Default is true.

Output variable:

 Basename  The Filename with any leadin pathname and (optionally) any suffix stripped off.

Internal variables:

 basename_left  Leftmost character of stripped name.
 basename_right  Rightmost character of stripped name.

The Basename_Shell_Utils code listing contains additional documentation.

Michael L. Hall