I have made this lisp to delete a file but its not working. Path is correct I checked executing same path. But I also tried using the command "DEL" in cmd to delete the file from that folder and it gives error "System cannot find path specified" I tried using cmd in admin mode but no success.
Command: "DEl C:\\Log_Files\\ABC.mtn"
(the text file is in .mtn extension)
Interesting thing is it deletes the file which are on Desktop
(defun c:DSTDEL ( / fnam )
(setq fnam (strcat "C:\\Log_Files\\"(vl-filename-base (getvar "dwgname")) ".mtn"))
(setq cmd (strcat "DEL " fnam))
(command "SHELL" cmd)
(princ)
)