Monday, October 11, 2010

Visual Basic File System Statement : MKDir

Purpose : the MKDir statement creates a subdirectory on the specified drive.

Syntax :
MKDir dirname$

dirname$ must be in format of
[drive:][ \ ] dir [ \ subdir ] [ \ subdir ] ...

MKDir "TEST"
MKDir "\TEST"
MKDir "D:\TEST"

the first example creates the subdirectory TEST below the defult directory on the default drive.
the second line creates the subdirectory TEST below the root directory of the default drive.
and third example creates the subdirectory TEST below the root directory of the D drive.

No comments:

Post a Comment