|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
create a folder useing vb code?take a look a system.io
specifically system.io.directory <zon***@yahoo.com> wrote in message Show quoteHide quote news:1155733991.368836.174160@h48g2000cwc.googlegroups.com... > How can i create a folder using vb.net code? > > Thanks > 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 zon***@yahoo.com wrote: Show quoteHide quote > How can i create a folder using vb.net code? > > Thanks 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 Show quoteHide quote > 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 > zon***@yahoo.com wrote: > >> How can i create a folder using vb.net code? >> >> Thanks >> Hello Cyril,
Thanks, But i'v declared the "di" variable just to determine whether the directory exists. Regards Elnahrawi Cyril Gupta wrote: Show quoteHide quote > 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 > > zon***@yahoo.com wrote: > > > >> How can i create a folder using vb.net code? > >> > >> Thanks > >>
ANN: VS.NET 2003 SP1
Memory Usange In VB.NET Serial Port Communuciation in VB with Compact Framework 2.0 Capturing the second column data from a list view box. Automaticaly Clicking a Checkbox on a webbrowser control hyperlink text ISDATE() took 8 seconds to complete ? Am I doing this right? client side dataset and dataset force immediate VS05 compile? |
|||||||||||||||||||||||