CALL MKDIR
This page was last modified 11:21, 18 May 2020 by Mars2000you. Based on work by Gdx and Rderooy.

Contents

Effect

Creates (makes) a new directory.

This operation will also automatically create two special sub-directories called '.' and '..'. These folders allow '.' and '..' to be given in path names to signify the current and parent directories respectively.

Only works with version 2 of Disk BASIC, as provided by the MSX-DOS2 cartridge or the MSX Turbo R machines.

Note: Only one directory can be created at a time.

Syntax

CALL MKDIR ("<Device>:\<Path>")

Notes:

  • Character backslash (\) serves as a separator between the folders and the file name in MSX-DOS2. You don't have to put it after the colon of the device name.
  • Character backslash is replaced by the character yen (¥) on Japanese MSX or the character won (₩) on Korean MSX.
  • Wildcards can not be used.

Parameters

<Device> is the name of destination device. It can only be a disk drive.

If you don't specify the drive, the instruction will be applied to the current drive (by default, it's drive A:)

Device type Device name Remark
Disk drive A, B, C, D, E, F, G, H A floppy disk interface can control until 2 drives.


<Path> is used to specify the location in folders of folder to create. The last name (the rightmost one) must be the name of the new folder.

Examples

CALL MKDIR ("GAMES")  'Create a directory named GAMES
Ok
CALL MKDIR ("GAMES\APP1") 'Create a directory named APP1 underneath GAMES
Ok
CALL MKDIR ("FAIL\APP3") 'Directory FAIL does not exist
Directory NOT found
Ok

Related to

CALL CHDIR, CALL RMDIR, FILES

Compatibility

Disk BASIC 2.0 or higher