MKDIR creates a directory.
Syntax:RetVal = MKDIR(DirectoryName AS STRING) Return Value:
Parameters:
|
👉 MKDIR can create only one directory each time it is invoked. In the following example, only the directory "BCX" can be created.
DIM DirectoryName$ DIM RetVal% DirectoryName$ = "C:\Temp\BCX" RetVal% = MKDIR(DirectoryName$) IF RetVal% = 0 THEN PRINT "MKDIR created the directory " & DirectoryName$ ELSEIF RetVal% = -1 THEN PRINT "MKDIR could not create the directory." END IF
MKDIR created the directory C:\Temp\BCX
MKPATH creates a multi-level directory path all at once. If any part of the path already exists, MKPATH will add the remaining parts.
Syntax:MKPATH(PathToMake AS STRING) Parameters:
|
$BCXVERSION "7.5.2" DIM PathToMake$ PathToMake$ = "C:\Temp\BCX\Does it ALL" MKPATH(PathToMake$) IF EXIST(PathToMake$) THEN PRINT "MKPATH created the directory path" & PathToMake$ ELSE PRINT "MKPATH could not create the directory path." END IF
MKPATH created the directory C:\Temp\BCX\Does it ALL