Siebel VB Language Reference > VB Language Reference >
MkDir Statement
This standard VB statement creates a new folder. Syntax
MkDir [drive:][\folder\]folder
|
|
drive: |
(Optional) The name of the drive on which the folder is to be created, as a letter, or a string expression representing the drive name |
\folder\ |
If the folder is not to be created on the current folder of the specified drive (or the default drive if none is specified), the path to the folder in which the new folder is to be created, or a string expression representing the path |
folder |
The name of the folder to be created, or a string expression representing the folder name |
Returns
Not applicable Usage
The drive: argument is optional. If drive: is omitted, MkDir creates the new folder on the current drive. If the drive: argument is used, it must include the colon. Example
This example makes a new temporary folder in C:\ and then deletes it. Sub Button_Click Dim path as String On Error Resume Next path = CurDir(C) If path <> "C:\" then ChDir "C:\" End If MkDir "C:\TEMP01" If Err = 75 then Else RmDir "C:\TEMP01" End If End Sub
See Also
ChDir Statement ChDrive Statement CurDir Function Dir Function RmDir Statement
|