MkDir With Multiple SubDirs

MoleY

Registered User.
Local time
Today, 13:32
Joined
Nov 16, 2009
Messages
12
Good Afternoon,
What is the code to make multiple sub Directories?

I currently have the following, which works no probs

Private Sub Command70_Click()
[Drawing Number].SetFocus
If Len(Dir("\\Gimli\dofiles\CO Drawings\ABC\Drawings Issued\LW\" & [Drawing Number].Text, vbDirectory)) = 0 Then
MkDir "\\Gimli\dofiles\CO Drawings\ABC\Drawings Issued\LW\" & [Drawing Number].Text
End If
End Sub

Basically this creates a Directory based on the Drawing Number within the form.

But now I need to add the following folders ino the new directory, Awaiting Checking, Awaiting Approval, Obsolete.

Cheers
Stuart
 
Last edited:
Hello,
Thankyou for your response,
I did try the following

MkDir "\\Gimli\dofiles\CO Drawings\ABC\Drawings Issued\LW\" & [Drawing Number].Text\"Awaiting Checking"
But nothing happened, it just added the original folder with no awaiting checking folder
Cheers
 
more likely something like

strg = "\\Gimli\dofiles\CO Drawings\ABC\Drawings Issued\LW\" & [Drawing Number]

MkDir strg
mkdir strg & "\awaiting checking"
mkdir strg & "\awaiting approval"

because there are embedded spaces you MAY have to do this

mkdir chr(34) & strg & "\awaiting approval" & chr(34)

chr(34) is dbl-quote
 
I've litterally this second just sorted it,

I've had to use:

MkDir "\\Gimli\dofiles\CO Drawings\ABC\Drawings Issued\LW\" & [Drawing Number].Text & "\" & "Current Issue"

Thankyou for your reply, i'm sure this won't be my last question!
 

Users who are viewing this thread

Back
Top Bottom