Create New Directory
Imports System
Imports System.IO
Module Module1
Sub Main()
CreateDirectory()
End Sub
Sub CreateDirectory()
Dim Path As String
Path = "D:\MyworkFolder"
Directory.CreateDirectory(Path)
End Module
Try
If Directory.Exists(Path) Then
Console.Write("This Folder already Exist")
Else
End If
Catch ex As Exception
Console.Write(ex.ToString)
End Try
Dim PathToMove As String
PathToMove = "D:\MyworkFolder"
Dim Destination As String
Destination = "D:\Bilal\MyworkFolder"
If Directory.Exists(PathToMove) Then
Directory.Move(PathToMove, Destination)
Console.Write("There is No such Directory to move")
Move Directory
Directory.Delete(Path)
Console.Write("There is No such Directory to Delete")
Posted on 4/2/2007 6:00:22 AM by Ashish Chavan
Posted on 1/2/2008 11:21:19 PM by B.Guru murthy
Posted on 1/21/2008 11:15:01 PM by Varun Patel
Posted on 8/24/2008 9:01:39 PM by yogesh
Posted on 11/11/2009 2:10:02 AM by Sunil
Posted on 4/21/2010 7:45:54 PM by OD
Posted on 6/16/2010 2:42:08 PM by Archana Parikh