Hello, lisp , I want to get the path without the last folder

Hello, lisp , I want to get the path without the last folder

eng_minamaged
Advocate Advocate
1,551 Views
23 Replies
Message 1 of 24

Hello, lisp , I want to get the path without the last folder

eng_minamaged
Advocate
Advocate

Hello, lisp , I want to get the path without the last folder  (setq my-path "C:\\Users\\Username\\Documents\\Folder1\\Folder2\\") 

0 Likes
1,552 Views
23 Replies
Replies (23)
Message 21 of 24

eng_minamaged
Advocate
Advocate
no function definition: VL-DIRECTORY-P occurred
0 Likes
Message 22 of 24

paullimapa
Mentor
Mentor

My bad  VL-File-DIRECTORY-P


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 23 of 24

paullimapa
Mentor
Mentor
Accepted solution

I guess you missed my reply msg #22:

paullimapa_0-1690952365916.png

so the code should be this:

(if(not(vl-file-directory-p (strcat result "/new  Drawings")))(vl-mkdir (strcat result "/new  Drawings")))

 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 24 of 24

eng_minamaged
Advocate
Advocate
Thank you very much for your help. Yes, I missed the reply msg. Thank you for your time
0 Likes