Using DOS Formatted Floppy Disks


You can read DOS floppies from IBM RT, DECstation 5000/25, DEC 3100, RS/6000, and Sun SparcClassic workstations.

If you have BLANK disks, you must first format them. This can be done either on your own IBM PC or PS/2 home computers, or on most athena workstations. For information on how to do this, consult the stock answer entitled How to FORMAT FLOPPIES on Athena under the WORKSTATIONS topic.

Once the floppy is formatted, you can use the Mtool suite of commands to manipulate files on the disk. You will need to type

add consult
once at your athena prompt before you can access the commands. A brief summary is presented below.

    Mtool     MSDOS
    name      equivalent       Description

    mattrib   ATTRIB           change MSDOS file attribute flags
    mcd       CD               change MSDOS directory
    mcopy     COPY             copy MSDOS files to/from Unix
    mdel      DEL/ERASE        delete an MSDOS file
    mdir      DIR              display an MSDOS directory
    mformat   FORMAT           add MSDOS filesystem to a low-level format
    mlabel    LABEL            make an MSDOS volume label.
    mmd       MD/MKDIR         make an MSDOS subdirectory
    mrd       RD/RMDIR         remove an MSDOS subdirectory
    mread     COPY             low level read (copy) an MSDOS file to Unix
    mren      REN/RENAME       rename an existing MSDOS file
    mtype     TYPE             display contents of an MSDOS file
    mwrite    COPY             low level write (copy) a Unix file to MSDOS
You should be able to just close your eyes and pretend you're on an MSDOS system. Everything should work the same... except for the added m at the beginning of each command.

For example, to copy a file from the floppy to the current directory, you would type

mcopy a: filename filename
To write a file to the floppy, you would type
mcopy filename a: filename
Not all of the mtool programs are supported on some types of workstations. To see which ones are available, type:
add consult
ls /mit/consult/$bindir/m*
That will list all the mtools available, as well as some additional programs. For more information, type:
add consult
man mtools
The pattern matching routine more closely resembles Unix than MSDOS. For example, "*" matches all MSDOS files in lieu of "*.*".

The use of wildcards (or the 'separator) will require the names to be enclosed in quotes to protect them from the shell. For example:

RIGHT: mcopy "a:*.c" .
will copy all files on the A: disk with the extension .C to the current Unix directory.
WRONG: mcopy a:*.c .
will cause the shell to expand a:*.c in the current Unix directory (which is probably not what you wanted) then copy that list of files (if there were any) from A: to the current Unix directory.
RIGHT: mcopy *.c a:
will copy all files with the extension .c in the current Unix directory to the A: drive. (This time you want the shell the expand the *.c).

In addition to the mtools commands, the following may also be used on all public workstations except the Sun Sparc Classics to manipulate files. Note that if you want to use subdirectories on the diskette, that you will need to use the Mtools commands instead.

        Command                 Usage

        dosdir                  Display MSDOS directory
        doswrite filename       write filename to the floppy
        dosread filename        copy filename to the current directory
For more information on these commands type
man dosdir