MSDOS filenames are optionally composed of a drive letter followed by a colon, a subdirectory, and a filename. 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.
The regular expression "pattern matching" routines follow the Unix-style rules. For example, `*' matches all MSDOS files in lieu of `*.*'. The archive, hidden, read-only and system attribute bits are ignored during pattern matching.
Not all Unix filenames are appropriate in the MSDOS world. The Mtools commands may have to alter Unix names to fit the MSDOS filename restrictions. Most commands have a -v (verbose) option that will display the new names if they have been changed. The following table shows some examples of filename conversions:
l l l. Unix name MSDOS name Reason for the change _ _ _ thisisatest THISISAT filename
The mcd command is used to establish the device and the current working directory (relative to the MSDOS filesystem), otherwise the default is assumed to be A:/.
All the Mtools commands return 0 on success, 1 on utter failure, or 2 on partial failure.
Unless the host operating requires hardwired device setup, the description of the devices on which to operate is loaded from /etc/mtools where each line describes one device. The first word is the device letter name, the second the type of FAT (12 or 16 bits), the third the number of cylinder, the fourth is the number of heads, and the fifth word is the number of sector per track. If zero is specified for any of the last three a guess will be attempted; if using any one line fails, the next lines that apply to that device are tried in turn.