August 8, 2004
You have to create a IO.DirectoryInfo(path) with the path being the
parent of the folder you want. So if you wanted to create the folder:
"c:\program files\MyNewFolder", you would create a
DirectoryInfo("c:\program files") object. Then you call the
CreateSubDirectory(newfoldername) method of the DirectoryInfo object...
Private Sub Button1_Click(...)
Dim iDirectory as New System.IO.DirectoryInfo("c:\program files\")
iDirectory.CreateSubDirectory("MyNewFolder")
End Sub
This would then create the MyNewFolder in C:\Program Files\.
Have a nice day!
Joseph
"Rachel" wrote:
I have tried:
System.IO.File.Create("C:\FolderName")
It does not create a folder. Any ideas without using the File System Object?
Rachel