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

Contents

Effect

Deletes (removes) a directory.

In order to delete a directory, it must contain no other files or other directories except for the special '.' and '..' directories which are always contained in a directory. These are put in a new directory when it is created and cannot be removed.

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 removed at a time.

Syntax

CALL RMDIR ("<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 disk. It can only be a disk drive.

If you don't specify the drive, the instruction will be applied to the currently active 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 remove. The last name (the rightmost one) must be the name of the folder to remove.

Examples

CALL RMDIR ("GAMES\APP1")  'Deletes the APP1 directory inside the GAMES directory
Ok
CALL RMDIR ("GAMES\APP2") 'APP2 directory is not empty!
File already exists
Ok

Related to

CALL CHDIR, CALL MKDIR, FILES

Compatibility

Disk BASIC 2.0 or higher