-->

Previous | Table of Contents | Next

Page 329

mrd

mrd—Remove an MS-DOS subdirectory

SYNOPSIS

mrd [ -v ] msdosdirectory [ msdosdirectories... ]

DESCRIPTION

mrd removes a directory from an MS-DOS FILESystem. mmd will allow the following command-line option:
v Verbose mode. Display the directory name as it is removed.

An error occurs if the directory does not exist or is not empty.

SEE ALSO

mtools(1), mmd(1), mdeltree(1)

Local

mread

mread—Read (copy) an MS-DOS file to UNIX

SYNOPSIS

mread [ -tnvmoOsSrRA ] msdosfile unixfile

mread [ -tnvmoOsSrRA ] msdosfile [ msdosFILES... ] unixdirectory

DESCRIPTION

This command is obsolete, and only supplied for backwards compatibility reasons with old scripts. Use mcopy instead.

SEE ALSO

mcopy(1), mtype(1), mtools(1)

mren

mren—Rename or move an existing MS-DOS file or subdirectory

SYNOPSIS

mren [ -voOsSrRA ] sourcefile targetfile



mmove [ -voOsSrRA ] sourcefile [ sourceFILES... ] targetdirectory

DESCRIPTION

mren renames an existing file on an MS-DOS FILESystem.

Mren will allow the following command-line option:

voOsSrRA Verbose mode. Display the new filename if the name supplied is invalid.

If the first syntax is used (only one sourcefile), and if the target name doesn't contain any slashes or colons, the file (or subdirectory) will be renamed in the same directory, instead of being moved to the current mcd directory as would be the case with mmove. Unlike the MS-DOS version of REN, mren can be used to rename directories.

Page 330

BUGS

Unlike the MS-DOS version of REN, mren can be used to rename directories.

SEE ALSO

mcd(1)

Local

mtest

mtest—Test the mtools configuration FILES

SYNOPSIS

mtest

DESCRIPTION

mtest reads the mtools configuration FILES and prints the cumulative configuration to stdout. The output can be used as a configuration file itself (although you might want to remove redundant clauses). You may use this program to convert old-style configuration FILES into new style configuration FILES.

SEE ALSO

mtools(5)

Local

mtools

mtools—A collection of tools for manipulating MS-DOS FILES

SYNOPSIS

The mtools are

mattrib—Change MS-DOS file attribute flags

mbadblocks—Test a floppy disk, and mark the bad blocks in the FAT

mcd—Change MS-DOS directory

mcopy—Copy MS-DOS FILES to/from UNIX

mdel—Delete an MS-DOS file

mdir—Display an MS-DOS directory

mformat—Add an MS-DOS FILESystem to a low-level formatted floppy disk

mlabel—Make an MS-DOS volume label

mmd—Make an MS-DOS subdirectory

mmount—Mount an MS-DOS disk

mrd—Remove an MS-DOS subdirectory

mmove—Move or rename an MS-DOS file or subdirectory

mren—Rename an existing MS-DOS file

mtype—Display contents of an MS-DOS file

mtest—Test and display the configuration

Page 331

DESCRIPTION

mtools is a public domain collection of programs to allow UNIX systems to read, write, and manipulate FILES on an MS-DOS FILESystem (typically a floppy disk). Where reasonable, each program attempts to emulate the MS-DOS equivalent command. However, unnecessary restrictions and oddities of DOS are not emulated. For instance, it is possible to move subdirectories from one subdirectory to another.

MS-DOS filenames are optionally composed of a drive letter followed by a colon, a subdirectory, and a filename. Filenames without a drive letter refer to UNIX FILES. Subdirectory names can use either the / or \ separator. The use of the \ separator or wildcards will require the names to be enclosed in quotes to protect them from the shell. (Note: Wildcards in UNIX filenames should not be enclosed in quotes, because here users want the shell to expand them.)

Differences with MS-DOS

The regular expression "pattern matching" routines follow the UNIX-style rules. For example, * matches all MS-DOS FILES in lieu of *.*. The archive, hidden, read-only, and system attribute bits are ignored during pattern matching.

All OPTIONS use the - (minus) flag, not / as you'd expect in MS-DOS.

Most mtools commands allow multiple filename parameters, which doesn't follow MS-DOS conventions, but which is more user friendly.

Working Directory

The mcd command is used to establish the device and the current working directory (relative to the MS-DOS FILESystem); otherwise, the default is assumed to be A:/. However, unlike MS-DOS, there is only one working directory, and not one per drive.

VFAT-Style Long Filenames

This version of mtools supports VFAT-style long filenames. If a UNIX filename is too long to fit in a short DOS name, it is stored as a VFAT long name, and a companion short name is generated. This short name is what you see when you examine the disk with a pre-7.0 version of DOS. The following table shows some EXAMPLES of short names:

UNIX Name MS-DOS Name Reason for the Change
thisisatest THISISAT Filename too long
alain.knaff ALAIN.KNA Extension too long
prn.txt XRN.TXT PRN is a device name
.abc X.ABC Null filename
hot+cold HOTXCOLD Illegal character

The initial UNIX-style filename (whether long or short) is also called primary name, and the derived short name is also called secondary name.

Example:

mcopy /etc/motd a:Reallylongname

mtools creates a VFAT entry for Reallylongname, and uses REALLYLO as a short name. Reallylongname is the primary name, and REALLYLO is the secondary name.

In this example:

copy /etc/motd a:motd

motd fits into the DOS filename limits. mtools doesn't need to derivate another name. motd is the primary name, and there is no secondary name.

In a nutshell: The primary name is the long name, if one exists, or the short name if there is no long name.

Previous | Table of Contents | Next