Jump to content

Recommended Posts

Posted (edited)

hello :

 

 

I use this routine to create folder

with the current file path

 

 

 

 

Edited by leonucadomi
Posted (edited)
5 minutes ago, leonucadomi said:

hello :

 

 

I use this routine to create folder

with the current file path

 

but I don't know how I can create a folder inside that folder  :(

 

can anybody help me?

 

(defun C:TEST (/ dwgpre)


(setq dwgpre (strcat (getvar "dwgprefix") "\RV 0"))
(if (= (vl-file-directory-p dwgpre) nil)
(vl-mkdir dwgpre)
)

 );DEFUN

 

 

 

You need a double backslash \\RV 0 and you don't need to check if it exists:

(defun c:test nil (vl-mkdir (strcat (getvar "dwgprefix") "\\RV 0")))

 

Here is a quick example to make nested folders:

(defun c:test (/ pre)
  (setq pre (getvar 'dwgprefix))
  (foreach d '("\\RV 0" "\\RV 1" "\\RV 2") (vl-mkdir (setq pre (strcat pre d))))
)

 

Edited by ronjonp
  • Agree 1
Posted

I WANT TO CREATE A FOLDER CALLED "RV 0" AND WITHIN TWO FOLDERS  HELP PLEASE

Posted

ONE CALLED DWG AND ANOTHER PDF

Posted
49 minutes ago, leonucadomi said:

ONE CALLED DWG AND ANOTHER PDF

(defun c:test (/ pre)
  (vl-mkdir (setq pre (strcat (getvar 'dwgprefix) "\\RV 0")))
  (foreach d '("\\DWG" "\\PDF") (vl-mkdir (strcat pre d)))
)

 

Posted

excellent it has been very helpful thank you

  • leonucadomi changed the title to MAKE lsp

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...