Re: create a folder useing vb code?
- From: Cyril Gupta <cyril@xxxxxxxxxx>
- Date: Thu, 17 Aug 2006 11:28:26 +0000 (UTC)
Hello Tips,
There's another method that removes the need of declaring a variable.
System.IO.Directory.CreateDirectory("C:\MyDirectory")
This single line will serve your purpose well.
Regards
Cyril Gupta
You can do anything with a little bit of 'magination.
I have been programming so long, that my brain is now soft-ware.
http://www.cyrilgupta.com/blog
In VB 2005 using
My.Computer.FileSystem.CreateDirectory ("C:\MYDIR")
In VB.NET
Imports System
Imports System.IO
Dim di As DirectoryInfo = New DirectoryInfo("c:\MyDir")
' Determine whether the directory exists.
If di.Exists Then
' Indicate that it already exists.
msgbox("That path exists already.")
Else
' Try to create the directory.
di.Create()
End If
zoneal@xxxxxxxxx wrote:
How can i create a folder using vb.net code?
Thanks
.
- Follow-Ups:
- Re: create a folder useing vb code?
- From: Tips
- Re: create a folder useing vb code?
- References:
- Re: create a folder useing vb code?
- From: Tips
- Re: create a folder useing vb code?
- Prev by Date: Re: Regular Expression for Integer and Float
- Next by Date: Re: create a folder useing vb code?
- Previous by thread: Re: create a folder useing vb code?
- Next by thread: Re: create a folder useing vb code?
- Index(es):
Relevant Pages
|