Re: create a folder useing vb code?



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



.



Relevant Pages

  • Re: Question about HSRP
    ... What is purpose does a secondary virtual ip address serve? ... If you have multiple logical subnets on the LAN, the router ... needs an address in each subnet. ...
    (comp.dcom.sys.cisco)
  • Re: Question about HSRP
    ... What is purpose does a secondary virtual ip address serve? ... the router has failed to defend its ARP cache ... state changes, last state change 00:30:59 ...
    (comp.dcom.sys.cisco)
  • Re: differences between chimps and humans
    ... They must serve some purpose, ... Isn't there a lot more junk DNA than there is "understood" DNA? ... sequences become useless and die off, new sequences come out of junk DNA ...
    (talk.origins)
  • Re: cross browser problem
    ... > On a site showing how to get better google results, ... > filling the alt tags with your keywords. ... The alt text has a documented purpose, and works rather well for that ... Note that key phrase "to serve as content". ...
    (uk.net.web.authoring)
  • Re: Import Word Field data into Excel
    ... field data - they can't solely serve the purpose of formulas and easy ... user entry, can they? ... PDF in Acrobat Reader (I use a Mac and can save from Preview or print ...
    (microsoft.public.word.docmanagement)