Add a Directory to Existing Directory

Add a Directory to Existing Directory

Todd_Rogers
Mentor Mentor
530 Views
7 Replies
Message 1 of 8

Add a Directory to Existing Directory

Todd_Rogers
Mentor
Mentor

So, I'm trying to add a directory to an existing directory, but I only know how to create a directory. For example, I'm using this...

(vl-mkdir "C:\\ProgramData\\Autodesk\\ApplicationPlugins\\AECBIMTools.Civil3DTools.bundle\\Contents")

 

We all know that C:\ProgramData\Autodesk\ApplicationPlugins already exists. So, how do I go about adding the AECBIMTools.Civil3DTools.bundle\Contents to that directory?

 

Todd Rogers
Civil Administration at Walter P Moore
0 Likes
Accepted solutions (1)
531 Views
7 Replies
Replies (7)
Message 2 of 8

ВeekeeCZ
Consultant
Consultant
Accepted solution

One by one!

 

(vl-mkdir "C:\\ProgramData\\Autodesk\\ApplicationPlugins\\AECBIMTools.Civil3DTools.bundle")

(vl-mkdir "C:\\ProgramData\\Autodesk\\ApplicationPlugins\\AECBIMTools.Civil3DTools.bundle\\Contents")

Message 3 of 8

Todd_Rogers
Mentor
Mentor

I'm trying to add \AECBIMTools.Civil3DTools.bundle\Contents to the existing directory C:\ProgramData\Autodesk\ApplicationPlugins

Todd Rogers
Civil Administration at Walter P Moore
0 Likes
Message 4 of 8

ВeekeeCZ
Consultant
Consultant

@Todd_Rogers 

 

the issue is not that you need to add a dictionary to the existing one. After all, there is no other way! The issue is that you want to add two of them. But the function isn't smart enough... so create one, then another.

0 Likes
Message 5 of 8

Todd_Rogers
Mentor
Mentor

I swear I thought there was a merge-pathnames you can call.

Todd Rogers
Civil Administration at Walter P Moore
0 Likes
Message 6 of 8

komondormrex
Mentor
Mentor

actually you can do that in one step like this

(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "shell md C:\\ProgramData\\Autodesk\\ApplicationPlugins\\AECBIMTools.Civil3DTools.bundle\\Contents\n")
Message 7 of 8

komondormrex
Mentor
Mentor

using et

(acet-sys-command "md C:\\ProgramData\\Autodesk\\ApplicationPlugins\\AECBIMTools.Civil3DTools.bundle\\Contents")

 

Message 8 of 8

Simon_Weel
Advisor
Advisor

In the old days, when Vlisp didn't exist, we used DOSLib for this kind of operations. Still use it.

0 Likes