I'm trying to check for the existence of a drive using lisp, then if not found perform a task (represented in my below example by the alert)
however it dose not work could somebody suggest how I can achieve this?
(if (vl-file-directory-p "C:\ten") T) (alert "exists"))
I know it doesn't work because if I change the T to nil as demonstrated bellow I should invoke the opposite reaction from autocad but instead I get the exact same outcome which is an alert telling me the file exists?
(if (vl-file-directory-p "C:\ten") nil) (alert "exists"))
Solved! Go to Solution.
Solved by The_Caddie. Go to Solution.
Try
(if (findfile "c:/Test")
(alert "Exists")
)
EDIT
Change
"C:\ten"
to
"C:\\ten"
or
"C:/ten"
@pbejse
Oops too slow...
Henrique