Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[VB.NET]Create a Folder

This is a VERY basic way to create a folder

Lets create 1 Combobox, and let a label over it with the text : "Path:"
Under that, make a Label named "Name :" and under that do a Textbox
And Under that make a Button with text Create.
In Combox collection (list) add like "C:\" or "C:\Program Files" or "D:\", just whatever ur drive is.

Double click the Button, we're gonna use filesystem (My.Computer.FileSystem)

Code
If My.Computer.FileSystem.DirectoryExists(ComboBox1.Text + "\" + TextBox1.Text) Then
            MsgBox("Folder already exists, pick a new name.", MsgBoxStyle.Information, "Folder Exists")
        Else
            My.Computer.FileSystem.CreateDirectory(ComboBox1.Text + "\" + TextBox1.Text)
        End If

If You Like this tutorial, please check out my other tutorials by clicking ==> H3R3


[img]http://i685.photobucket.com/albums/vv215/blackpearl4/THANKS.gif[/img]
PHP & .NET Contributor.
Not bad. It could be explained wayy more, though.
This is a TUTORIAL.
Helpful, thank you very much
(May 4, 2010 04:41 PM)cybr Wrote:  Not bad. It could be explained wayy more, though.
This is a TUTORIAL.


not really because this is as easy as vb.net can be while coding like a pro....
PHP & .NET Contributor.
Thanks For this SNippet


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by iRuSTecHAug 27, 2018 05:02 AM 4 577 Aug 27, 2018 05:02 AM
Last Post: InterGalactic
[C#] by Pim FortuynMar 18, 2017 10:49 AM 12 487 Mar 18, 2017 10:49 AM
Last Post: Pim Fortuyn
[.NET] by -VariousJun 28, 2016 03:36 PM 8 202 Jun 28, 2016 03:36 PM
Last Post: Zettabit