VB.NET创建文件夹方法如下:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
If Directory.Exists(TextBox1.Text) Then
MsgBox("此目录存在")
Return
End If
Dim di As DirectoryInfo = Directory.CreateDirectory(TextBox1.Text)
MsgBox("创建成功")
Catch ex As Exception
MsgBox("文件异常", ex.ToString)
End Try
End Sub
由下图可知,已创建新目录成功