MkDir
Makes a folder/directory on the local file system
Syntax
`
Declare Function MkDir ( ByRef folder As Const String ) As Integer
`
Usage
`
result = MkDir( folder )
`
Parameters
`folder`
The folder/directory to be created.
Return Value
Returns zero (0) on success, and negative one (-1) on failure.
Description
Creates a folder on the local file system.
Example
`
Dim pathname As String = "foo\bar\baz"
Dim result As Integer = MkDir( pathname )
If 0 <> result Then Print "error: unable to create folder " & pathname & " in the current path."
`
Platform Differences

- Linux requires the filename case matches the real name of the file. Windows and DOS are case insensitive.
- Path separators in Linux are forward slashes / . Windows uses backward slashes \ but it allows for forward slashes . DOS uses backward \ slashes.

Differences from QB

- None

See also

- `Shell`
- `ChDir`
- `RmDir`