vl-file-delete

AutoCad AutoLISP Functions

 
vl-file-delete
 
 
 

Deletes a file

(vl-file-delete  filename)

Arguments

filename

A string containing the name of the file to be deleted. If you do not specify a full path name, vl-file-delete searches the AutoCAD default drawing directory.

Return Values

T if successful; nil if delete failed.

Examples

Delete newauto.bat:

_$ (vl-file-delete "newauto.bat")
nil

Nothing was deleted because there is no newauto.bat file in the AutoCAD default drawing directory.

Delete the newauto.bat file in the c:\ directory:

_$ (vl-file-delete "c:/newauto.bat")
T

The delete was successful because the full path name identified an existing file.