HB_FNameDir
Extracts path portion of a file specification string
Syntax
HB_FNameDir( <cFileSpec> --> <cFilePath>
Arguments
<cFileSpec> : a character string to extract file path
Returns
<cFilePath> : path portion of <cFileSpec>
Note
<cFileSpec> may or may not include an ordinary file name at end. Function returns simply <cFileSpec> except last element <cFilePath> always include trailing OS path separator ( “\” )
Description
This function is used to extract path / dir portion of a full qualified file specification string. <cFileSpec> doesn’t require include an existing file / path info. This info can be optained by :
HB_FNameSplit( cFileSpec, @cPath ) OR ? IF( "\" $ cFileSpec, LEFT( cFileSpec, RAT( "\", cFileSpec ), cFileSpec
Example
? HB_FNameDir( "c:\temp\NewDirDB" ) // c:\temp\ ? HB_FNameDir( "c:\temp\NewDirDB\test.bat" ) // c:\temp\NewDirDB\
Seealso
HB_FNameName(), HB_FNameNameExt(), HB_FNameExt(), HB_FNameExtSetDef(), HB_FNameMerge(), HB_FNameSplit()