Imports System.IO
................................
Private Sub mnuCrearDir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCrearDir.Click
Try
Directory.CreateDirectory(TextBox1.Text)
'Creating a directory by specifying a path in the TextBox, of the form c:\examples
'Instead of using a TextBox you can directly type the location of the directory like this
'Directory.CreateDirectory("c:\examples")
MsgBox("Directory created OK!")
Catch
....................
End Try
End Sub
Private Sub mnuCopiarArchivo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCopiarArchivo.Click
Try
If OpenFileDialog1.ShowDialog <> DialogResult.Cancel Then
File.Copy(OpenFileDialog1.FileName, TextBox1.Text & "\" & _
OpenFileDialog1.FileName.Substring(OpenFileDialog1.FileName.LastIndexOf("\")))
'The above line of code uses OpenFileDialog control to open a dialog box where you
'can select a file to copy into the newly created directory
End If
MsgBox("File Copied Successfully")
Catch
......................
End Try
End Sub