Split a file name into a directory, root name, and extension.
Split a file name into a directory, root name, and extension. Each portion of the file name will be returned in a TAE string variable.
- INFILE
- Input file. The file specification to be examined.
- OPTION
- Option. Option for the type of file name that is to be split.
= LAS: Split a LAS file name = HOST: Split a host file name = LAS2HOST: Split a LAS file name and return the elements as a host file name. = HOST2LAS: Split a host file name and return the elements as a LAS file name.
- DIR
- Directory. TAE string variable to receive the directory portion of INFILE.
- ROOT
- Root file name. TAE string variable to receive the root file portion of INFILE.
- EXT
- File extension. TAE string variable to receive the extension portion of INFILE.
The LAS file specification [USER.IMAGES]USA;IMG is examined and the TAE string variables DIR, IMAGE, and EXTEN are assigned the values "[USER.IMAGES]", "USA", and "IMG" respectively.
The LAS file specification USA;IMG is examined and the TAE string variable DIR is assigned the current working directory while IMAGE and EXTEN are assigned the values "USA", and "IMG" respectively.
The host file specification /usr/images/usa/june.img is examined and the TAE string variables DIR, ROOT, and EXTEN are assigned the values "/usr/images/usa/", "june", and "img" respectively.
The host file specification "" is examined and the TAE string variable DIR is assigned the current working directory, while ROOT and EXTEN are assigned "".
INFILE is divided into a directory, root file name, and an extension. These components are then returned in the TAE string variables specified by the user.
If the directory is not specified, the current working directory will be returned. If the root file name or extension are missing, then the specified string variables are set to the empty string ("").
A fatal error was encountered. The message displayed preceding this message is the error that was encountered. Processing terminates.
An error was encountered while trying to pass a value back to the TAE variables. If the error persists, contact the system administrator.