Let's say we have a DOS directory notes, all of whose
files we want to read into Unix. The steps are similar to the above.
First insert the floppy. Next, get into the Unix directory where you
want the DOS files copied. Then create the Unix file (we call it
#!/bin/ksh Use ksh (see Chapter 5). dosfiles=`dosdir notes` List DOS files in directory notes. for i in $dosfiles Repeat for each file name. do dosread -a notes/$i $i Read from floppy directory notes. done
To write all files in the current Unix directory
to the DOS directory notes, you need replace the dosread line above with the doswrite line:
%doswrite -a $i /notes/$i Read into DOS directory notes.