Creating Directories

K

Keith

I am looking for a way to check if a directory exists on a
machine. If it dosn't I want to create it.

Can anybody help?
 
P

papou

Hi Keith
On Error Resume Next
ChDir "C:\Papou"
If Err <> 0 Then MkDir "C:\Papou"

HTH
Cordially
Pascal
 
S

sarasta

Well, I've coded that way :

Set a = CreateObject("Scripting.FileSystemObject")

If a.folderexists("c:\temp") Then

Else
a.createfolder ("c:\temp")
End I
 
Top