$fname (parse-spec) function


The filename portion of the pathname given by parse-spec is returned. (The parse-spec returns a standard pathname with either a backslash or forward slash characters.) This can be used to strip the path name, or ignore the path name component of a full pathname to a file.

Target string

Parse expression

Return value

File installationDirectory\X.txt

$fname(file *)

X.txt

F1: /susr/pass.x

$fname(f1: *)

Pass.x

Test - P: /x y z/aaa.exe - EOM


$fname(

$delim(spdash, p: *))

aaa.exe

Warning

Note

The pathname contains a space, hence we have to specify the spdash delimiter. (See the $delim() function for other possible delimeters.)

C:\x\y\zzz.xls

$suffix( $fname($1))

xls

Warning

Note

We get the suffix from the file at the specified pathname.

C:\x\y\zzz.xls

 

$basename( $fname($1))

Zzz

Warning

Note

We get the filename (without the suffix) from the file at the specified pathname.

Warning

Note

Replace installationDirectory with the directory in which you installed the product. The default directory is C:\Program Files\BMC Software\BMC Defender.

Related topic


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Command Center for Security 6.0