filename()

Description:

Split up the full path and get the file name and extension.

Syntax:

filename(fn)

Note:

The function splits the file name and extension from the full path fn.

Parameter:

fn

The full path with the file name

Options:

@e

Only split the extension part from the full path

@n

Split out the file name without the extension

@d

Split out the directory under which the file is located, inclusive of address string

@p

Add the main path before the file name of the non-absolute path. Return the main path directly if fn is ""

Example:

 

A

 

1

=filename("D://file/test.dfx")

Output “test.dfx

2

=filename@e("D://file/test.dfx")

Output “dfx

3

=filename@n("D://file/test.dfx")

Output “test

4

=filename@d("D://file/test.dfx")

Output “D://file

5

=filename@p("p2.txt")

Output

“D:\Program Files\raqsoft\esProc\demo\p2.txt”

6

=filename@p("")

Output

“D:\Program Files\raqsoft\esProc\demo”

Related functions:

file()

fill()

Description:

Create a new string by concatenating strings together.

Syntax:

fill(s,n)

Note:

Get a new string by concatenating n strings together

Parameters:

s

Source strings for making up a new string

n

Number of source strings that constitute the new string

Return value:

String

Example:

fill("1 ",10)

"1 1 1 1 1 1 1 1 1 1 "

fill("a b",10)

"a ba ba ba ba ba ba ba ba ba b"