MKDIR Statement Details Syntax MKDIR pathspec The pathname is a string expression specifying the name of the directory to be created. The pathname must be a string of less than 128 characters. The MKDIR statement works like the DOS command MKDIR; the syntax in BASIC cannot, however, be shortened to MD, as in DOS.