how to create new folder

just want to ask what is the easiest way to create a new folder with a given path??
e.g. how to create a folder "XYZ" in "C:\"???
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

use the mkdir method and give the path with folder name

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hi C8X,

In Visual Basic you can create a directory using the MKDIR command.

The sntax of the command is
     MKDIR path

Where path is the full path of the directory you wish to create.

To create the directory Indiglo on the C drive you could the following command
    MKDIR "E:\Indiglo"

Alternately, you could store the directory path in a variable such as
     MKDIR dir_to_make

You can also pull the directory name to create from a text box.  Assume you have a text box called txtDirToMake.  The command

     MKDIR txtDireToMake.Text

would create the directory specified in the text box.

you can use the Win API CreateDirectory() (i think the name is correct)

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.