vl-filename-extension

AutoCad AutoLISP Functions

 
vl-filename-extension
 
 
 

Returns the extension from a file name, after stripping out the rest of the name

(vl-filename-extension  filename)

Arguments

filename

A string containing a file name, including the extension. The vl-filename-extension function does not check to see if the specified file exists.

Return Values

A string containing the extension of filename. The returned string starts with a period (.) and is in uppercase. If filename does not contain an extension, vl-filename-extension returns nil.

Examples

_$ (vl-filename-extension
"c:\\acadwin\\acad.exe")
".EXE"
_$ (vl-filename-extension
"c:\\acadwin\\acad")
nil