Creates a directory


      DirMake( <cNewDir>) --> <nSuccess>


<cNewDir> : the name of the directory to be created, including an optional drive. If you do not specify a drive, the current one is used. The new directory can be specified relative to the current directory, or absolute, including a drive letter followed by a colon.


<nSuccess> : zero on success, -1 if there is an argument error; Otherwise, DirMake() returns the DOS error code. DirMake() returns 0 if successful;


DirMake() creates a specified directory. Note that first you must have sufficient rights to create a directory. To create nested subdirectories, you must create each subdirectory separately, starting from the top-level directory that you want to create (see example below.)


              DirMake() is equivalent to HB_DirCreate(), MakeDir() and HB_DirBuild()


      .  This example assumes that C:\TEST exists and uses DirMake()
         twice to create a nested subdirectory under it:

      DirMake("c:\test\one")    // Create top-most one
      nResult := DirMake("c:\test\one\two")
      IF nResult != 0
         ? "Cannot make directory, DOS error ", nResult

      You may also use something like this:

      DirMake( ".\test" )


DirChange(), DirName(), DirRemove(), MakeDir(), DirChange(), HB_DirCreate(), HB_DirBuild()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.