Create a folder

This example shows how to create a folder

Imports System.IO

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objDir As New DirectoryInfo(“d:\testfolder”)
Try
objDir.Create()
MsgBox(“Successful creation”)
Catch
MsgBox(“Failed to create folder”)
End Try

End Sub

End Class

Related posts:

  1. Does a directory exist Create a new Windows Forms application, and add a TextBox...
  2. Get the exact date and time this will display the exact date and time when the...
  3. A filestream example opening and reading a file using the FileStream   Imports...
  4. Play a wav file Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal...

Related posts brought to you by Yet Another Related Posts Plugin.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>