Transfer Entire Directory, DOS to Unix



next up previous contents index
Next: DOS Transfers Using Up: DOS Transfers under Previous: Write Entire Directory

Transfer Entire Directory, DOS to Unix

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 dosread.dir):


#!/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.       



next up previous contents index
Next: DOS Transfers Using Up: DOS Transfers under Previous: Write Entire Directory