leonucadomi Posted August 25, 2022 Posted August 25, 2022 (edited) hello : I use this routine to create folder with the current file path Edited August 26, 2022 by leonucadomi Quote
ronjonp Posted August 25, 2022 Posted August 25, 2022 (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 August 25, 2022 by ronjonp 1 Quote
leonucadomi Posted August 25, 2022 Author Posted August 25, 2022 I WANT TO CREATE A FOLDER CALLED "RV 0" AND WITHIN TWO FOLDERS HELP PLEASE Quote
leonucadomi Posted August 25, 2022 Author Posted August 25, 2022 ONE CALLED DWG AND ANOTHER PDF Quote
ronjonp Posted August 25, 2022 Posted August 25, 2022 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))) ) Quote
leonucadomi Posted August 25, 2022 Author Posted August 25, 2022 excellent it has been very helpful thank you Quote
Recommended Posts
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.