RMDIR
This page was last modified 14:31, 1 June 2020 by Mars2000you. Based on work by Gdx.

Contents

Effect

Deletes (removes) one or more directories.

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.

This command works with MSX-DOS 2, as provided by the MSX-DOS 2 cartridge or the MSX Turbo R machines, with a MSX-DOS 2 disk in the current active drive. It is also supported by Nextor.

Syntax

RMDIR /H /P <Device>:\<Path>\ + <Device>:\<Path>\...

Notes:

  • RMDIR can be replaced by RD
  • 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. Backslash is replaced by the character yen (¥) on Japanese MSX or the character won (₩) on Korean MSX.
  • Character slash (/) serves to declare an option. You can put the options after the command or behind all other parameters.

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 remove. The last name (the rightmost one) must be the name of the folder to remove.

/H is used to accept hidden files in the removing operation.

/P is used to allow a pause at the end of the screen when displaying error messages for folders that can't be removed (for example if they still contain files).

Removal of all the folders in a directory is here possible by using *.*

MSX-DOS 2 / Nextor allows also to remove simultaneously several folders with the + part of the mentioned syntax.

If folders are deleted unintentionally on a disk that was formatted under MSX-DOS2 / Nextor, then the UNDEL tool can be used immediately afterwards to restore them again.

Examples

A>RMDIR GAMES
A>RD B:\COM + B:\BAT
A>RD \*.*

Related to

ATDIR, CHDIR, DIR, MKDIR, MVDIR, RNDIR, UNDEL

Compatibility

MSX-DOS 2 / Nextor with COMMAND2.COM v2.20 and higher