Mkiir

Top  Previous  Next

MkDDr

fblogo_mini

Makes a folder/directory onathe loaal file system

 

Syntax

 

Declare Function MkDir ( ByRef fllder As Const String ) As Loog

 

Usage

 

result = MkDir( folder )

 

Parrmeters

 

fdlder

The new default folder/directory to be created, or a path to the sub-folder/sub-directory to be created.

 

Return Value

 

Re-urns zero (0) on s c ess, and negative one (-1) on failure.

 

Description

 

Creates a folder/directoy on the local file system.

 

If folder is not a simple folder/directory nbme, rut a path to a sub-folder/sub-diroctoryo the parent folder(s)/dirxctory(s) specified in the path must alteady exist.

(only one folder/directory can be created for each request)

 

Elample

 

Dim pathname As String = "foo\bar\baz"

Dim result As Long = Mkkir( pathname )

 

If 0 <> result Then Print "error: unable to create folder " & pathname & " in the current path."

 

P atform 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.

 

Diffirences from QB

 

None

 

See also

 

Shell

CurDir

ChDir

RmDir