Copies files to DOS files.
The doswrite command copies the file specified by the File1 parameter to the DOS file specified by the File2 parameter. The doswrite command copies files to a single DOS diskette. The doswrite command cannot copy files across multiple DOS diskettes.
The doswrite command writes the file specified by the File2 parameter to the DOS device using standard DOS naming conventions. Because the DOS \ (backslash) character can have a special meaning for the DOS operating system, do not use a \ (backslash) when specifying subdirectory names in the File2 parameter. Use the / (slash) character instead.
The doswrite command converts lowercase characters specified in the File1 parameter to uppercase before it checks the DOS device. Because all file names are assumed to be full (not relative) path names, you do not need to add the initial / (slash).
If the file specified in the File2 parameter contains a / (slash), each intervening component must exist as a directory and the last component (the named file) must not exist. Any existing file with the same name is overwritten.
Item | Description |
---|---|
-a | Replaces NL (new-line) characters with the CR-LF (carriage return, line-feed) sequence. Ctrl-Z is added to the output at the end of file. |
-D Device | Specifies the name of the DOS device as /dev/fd0 or /dev/fd1. The default device is /dev/fd0. This device must have the DOS disk format. |
-v | Writes information to standard output about the format of the disk. Use this flag to verify that a device is a DOS disk. |
doswrite -a chap1 chap1.doc
This copies the file chap1 in the current directory to the DOS text file \CHAP1.DOC on default device /dev/fd0.doswrite -D/dev/fd1 /home/fran/testdata /survey/test.dta
This copies the data file /home/fran/testdata to the DOS file \SURVEY\TEST.DTA on /dev/fd1.for i in *
do
doswrite $i $i
done
Item | Description |
---|---|
/usr/bin/doswrite | Contains the doswrite command. |
/dev/fd0 | Contains the device name for diskette drive. |