how to create new folder

Posted on 1999-07-09
Medium Priority
Last Modified: 2010-05-02
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:\"???
Question by:C8X
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

mraghuv earned 80 total points
ID: 1523180
use the mkdir method and give the path with folder name

Expert Comment

ID: 1523181
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.

LVL 10

Expert Comment

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


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question