Search: This Site | People | Departments | Penn State  
Penn State Home Page Population Research Institute Home Page
  contact PRI news directory sitemap home

SSRI Home Page PRI Home Page

Using MS-DOS Floppies


Insert a formatted floppy in the disk drive. High density floppies will work better. Double-density diskettes are not recommended.

There are two overall methods of using DOS floppies. The first method is using a set of utilties referred collectively as mtools. The second method involves "mounting" the floppy as a special pcfs filesystem which makes the DOS files on the floppy appear as normal UNIX files. Either method works, but both methods have their advantages and disadvantages. The mtools method is more reliable and less problematic, but the pcfs method is more transparent and allows you to directly access the files without copying them. We have been noticing a few nasty bugs in the pcfs system when using marginal floppies that may cause the system to lock up or to reboot the workstation. For this and other reasons, we encourage you to use the mtools method.

Using mtools

If you're familiar with DOS, this will be easy for you. Just replace the name of a typical DOS command and put an m before it. The result is the name of the mtools command to use. Here's a log of a typical session using mtools. The '%' represents your UNIX prompt, which is usually different.

First, get a directory of the diskette:

% mdir a:
 Volume in drive A has no label
 Directory for A:/

README   TXT       18639    4-29-94   2:57p
       1 File(s)     1438720 bytes free
%

Next, copy that file to your directory. (note case is not significant on DOS file names)

% mcopy a:readme.txt .
Copying README.TXT
% more readme.txt
(displays readme.txt)

Next, copy a file from your directory to the floppy:

% mcopy thesis.wp a:
Copying THESIS.WP
% mdir a:
 Volume in drive A has no label
 Directory for A:/

THESIS   WP         1570    5-17-94   1:15p
README   TXT       18639    4-29-94   2:57p
       2 File(s)     1436672 bytes free
%

And the file is copied to the floppy.

Using wildcards

Wildcards are handled differently than in DOS, and you need to be careful to avoid using wildcards so they don't conflict with UNIX's wildcarding mechanism. '*' is the wildcard which means "all files", not '*.*' as in DOS. If you're referring to files on the floppy, you need to put a backslash (\) before any wildcard characters (* or ?). So, you'd use the following command to copy all files on the floppy to your directory:

% mcopy a:\* .
Copying THESIS.WP
Copying README.TXT
%

But, you'd use the following command to copy all files on your directory to the floppy (note no backslash):

% ls
paa.wp     readme.txt   research.wp   thesis.wp
% mcopy * a:
Copying PAA.WP
Copying README.TXT
Copying RESEARCH.WP
Copying THESIS.WP
%

Other mtools commands

Errors

If you get an error reading or writing to the floppy, you'll get a message I/O error. If the disk is full, you'll get a message Disk full.

When you're doing using the diskette, eject it with the eject commad.

For more information, type man mtools. There are also individual man pages for each mtools command.

Using pcfs

This is an alternate method of accessing DOS floppies, which allows you to directly read and write to the floppy from other programs. However, as stated above, there are known problems with this system.

On Solaris machines, if you typed "volcheck", your floppy should already be "mounted." You can simply cd to /floppy/floppy0 and use standard Unix commands (see the bulletted list below) on the files present there (your floppy disk). You may have difficulty ejecting your disk when finished, however. Feel free to contact someone in the computer core for help. (We told ya to use mtools....)

For non-Solaris machines, type:
Mount /pcfs

This tells UNIX to make available the floppy diskette under the directory /pcfs.

If you get an error message: ... I/O error then the system can't read the directory information for this diskette. The UNIX system is not as forgiving as some DOS machines. You may also get this error message if the diskette is write-protected. In this case, use Mount -r /pcfs.

Once mounted, you may then copy, remove, edit the files on the diskette just by referring to them with /pcfs/ in front of the name. For example:

You may also directly work with files in /pcfs just as if they were normal files. For example you can load them directly into WordPerfect or Lotus 1-2-3, or save directly to the diskette.

Note that the filenames are in lower case.

When you are done with the floppy, type:
Umount /pcfs
Again, on Solaris machines this won't work.

On Solaris machines, type 'cd' and then 'eject'. (cd will make sure you're in your home directory - you could simply be sure you're not in /floppy/floppy0)

If you get the error message: /pcfs: Device busy, then some program still is using the floppy. For example:

To eject the floppy out of the drive, type:
eject
On Solaris machines you may need to contact someone in the computer core for help in ejecting the floppy disk.

To format a DOS diskette
Type fdformat -d

For more information, type man pcfs.


Click Here To Go Back To Main Unix Page

Last modified: 10/26/01 | Contact Webmaster
Privacy and Legal Statements | Copyright Information | ©Copyright 2006, The Pennsylvania State University |