How can I create a folder using vb.net code? and I want read & write access permission?

Posted by Gaddad under VB.NET on 10/19/2009 | Views : 16164 | Status : [Member] | Replies : 3
How can I create a folder using vb.net code? and I want read & write access permission?

Please help me.

Thanks in advance..




Responses

Posted by: Bubbly on: 1/25/2010 [Member] Bronze

Up
0
Down
Hello,

Check this link

http://www.pcreview.co.uk/forums/thread-3853038.php

++
Thanks & Regards,
Deepika

Gaddad, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Utsav on: 10/19/2009 [Member] Starter
Posted by: Tridev_2005 on: 10/22/2009 [Member] Starter

Up
0
Down
Create folder

Dim path As String = "c:\MyDir"


Try
' Determine whether the directory exists.
If Directory.Exists(path) Then
Console.WriteLine("That path exists already.")
Return
End If

' Try to create the directory.
Dim di As DirectoryInfo = Directory.CreateDirectory(path)
Console.WriteLine("The directory was created successfully at {0}.", Directory.GetCreationTime(path))

' Delete the directory.
di.Delete()
Console.WriteLine("The directory was deleted successfully.")

Catch e As Exception
Console.WriteLine("The process failed: {0}.", e.ToString())
End Try


Read/Write Permission
follow this link

http://www.aspnettutorials.com/tutorials/file/rw-file-aspnet2-vb.aspx



Gaddad, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response