vl-filename-base (AutoLISP)

Returns the name of a file, after stripping out the directory path and extension

Supported Platforms: Windows and Mac OS

Signature

(vl-filename-base filename)
filename

Type: String

File name. The vl-filename-base function does not check to see if the file exists.

Return Values

Type: String

Textual value containing filename in uppercase, with any directory and extension stripped from the name.

Examples

Windows
(vl-filename-base "c:\\acadwin\\acad.exe")
"ACAD"

(vl-filename-base "c:\\acadwin")
"ACADWIN"
Mac OS
(vl-filename-base "/myutilities/lsp/utilities.lsp")
"utilities"

(vl-filename-base "/myutilities/support")
"support"