MkDir


Function MkDir( path )


Returns 1 on success, 0 on failure to create the directory described by path.


Syntax MkDir("a:\backups")


Remarks

MkDir creates a new directory from the given path name path.

MkDir does not change the current working directory.


Restrictions

MkDir cannot create more than one level of subdirectory at a time.

For instance, if the floppy in drive A: is blank (no subdirectories), then the call MkDir("a:\documents\work") would fail.

These subdirectories could be created by making 2 calls to MkDir, as in:

MkDir("a:\documents") ' Create the documents subdirectory

MkDir("a:\documents\work") ' create a subdirectory to a:\documents called work


See Also:

Cwd ChDir RmDir File and Directory functions


Example Script


' Create C:\Temp if it does not exist.

IF NOT CHDIR("C:\Temp") THEN

MKDIR("C:\Temp")

ENDIF

CHDIR("C:\temp")

PRINT CWD()


Script Output


C:\temp