CSplitpath:GetFilenameExt
The GetFilenameExt method returns the filename+extension from a CSplitpath object. The returned string has a form like "filename.ext". If the filename has no extension, it is returned without a terminating period.
sNameExt = CSplitpath:GetFilenameExt() |
|
On success, this method returns a string containing the filename and extension.
On failure, this method returns nil.
Suppose a file exists with a full path named sPath. The following script retrieves the filename and extension components:
|
-- create a CSplitpath object |
|
-- Specify the path to be split |
|
-- assigns the filename + extension to sNameExt. |
|
-- when done with S, remove it from memory |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.