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

Contents

Effect

Renames one or more directories. The renaming can also have as effect to add an extension to the name of the folders, just like for a file name.

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

RNDIR /H [/P <Device>:\<Path>\ + <Device>:\<Path>\... <NewName>

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

<NewName> is the new name to apply to the folder. Wildcards can replace some characters in name to get several folders. The asterisk (*) and question mark (?) are used as wildcard characters. The asterisk matches any sequence of characters, whereas the question mark matches any single character.

The new name can't already be used for another file or folder on the disk inserted in the specified disk drive.

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

/P is used to allow a pause at the end of the screen when displaying error messages for folders that can't be renamed (for example if the new name is already used for an existing file or directory).

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

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

Examples

A>RNDIR UTIL COM
A>RNDIR B:\*.*/H/P *.OLD
A>RNDIR COM + BAT *.OLD

Related to

ATDIR, CHDIR, DIR, MKDIR, MVDIR, RMDIR

Compatibility

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