HB_FNameNameExt
Extracts file name and extension portion of a file specification
Syntax
HB_FNameNameExt( <cFileSpec> --> <cFileNameExt>
Arguments
<cFileSpec> : a character string to extract file name and extension
Returns
<cFileNameExt> : file name and extension portion of <cFileSpec>
Note
<cFileSpec> may or may not include an ordinary file name at end. Function returns simply last element of <cFileSpec>
Description
This function is used to extract file name and extension portion of a file specification string. <cFileSpec> doesn’t require include an existing file / path info.
This info can be optained by :
cFName := '' cFNExt := '' HB_FNameSplit( cFileSpec, , @cFName, @cFNExt ) ? cFName + cFNExt OR ? SUBSTR( cFileSpec, RAT( "\", cFileSpec ) +1 )
Example
? HB_FNameNameExt( "c:\temp\NewDirDB" ) // NewDirDB ? HB_FNameNameExt( "c:\temp\NewDirDB\test.bat" ) // test
Seealso
HB_FNameDir(), HB_FNameName(), HB_FNameExt(), HB_FNameExtSetDef(), HB_FNameMerge(), HB_FNameSplit()