mtools: mcopy
1
1 4.8 Mcopy
1 =========
1
1 The `mcopy' command is used to copy MS-DOS files to and from Unix. It
1 uses the following syntax:
1
1 `mcopy' [`-bspanvmQT'] [`-D' CLASH_OPTION] SOURCEFILE TARGETFILE
1 `mcopy' [`-bspanvmQT'] [`-D' CLASH_OPTION] SOURCEFILE [ SOURCEFILES... ] TARGETDIRECTORY
1 `mcopy' [`-tnvm'] MSDOSSOURCEFILE
1
1 `Mcopy' copies the specified file to the named file, or copies
1 multiple files to the named directory. The source and target can be
1 either MS-DOS or Unix files.
1
1 The use of a drive letter designation on the MS-DOS files, 'a:' for
1 example, determines the direction of the transfer. A missing drive
1 designation implies a Unix file whose path starts in the current
1 directory. If a source drive letter is specified with no attached file
1 name (e.g. `mcopy a: .'), all files are copied from that drive.
1
1 If only a single, MS-DOS source parameter is provided (e.g. "mcopy
1 a:foo.exe"), an implied destination of the current directory (``.'') is
1 assumed.
1
1 A filename of ``-'' means standard input or standard output,
1 depending on its position on the command line.
1
1 `Mcopy' accepts the following command line options:
1
1 `t'
1 Text file transfer. Mcopy translates incoming carriage return/line
1 feeds to line feeds when copying from MS-DOS to Unix, and
1 vice-versa when copying from Unix to MS-DOS.
1
1 `b'
1 Batch mode. Optimized for huge recursive copies, but less secure
1 if a crash happens during the copy.
1
1 `s'
1 Recursive copy. Also copies directories and their contents
1
1 `p'
1 Preserves the attributes of the copied files
1
1 `Q'
1 When mcopying multiple files, quits as soon as one copy fails (for
1 example due to lacking storage space on the target disk)
1
1 `a'
1 Text (ASCII) file transfer. `ASCII' translates incoming carriage
1 return/line feeds to line feeds.
1
1 `T'
1 Text (ASCII) file transfer with character set conversion. Differs
1 from `-a' in the `ASCII' also translates incoming PC-8 characters
1 to ISO-8859-1 equivalents as far as possible. When reading DOS
1 files, untranslatable characters are replaced by '`#''; when
1 writing DOS files, untranslatable characters are replaced by '`.''.
1
1 `n'
1 No confirmation when overwriting Unix files. `ASCII' doesn't warn
1 the user when overwriting an existing Unix file. If the target
1 file already exists, and the `-n' option is not in effect, `mcopy'
1 asks whether to overwrite the file or to rename the new file
1 (⇒name clashes) for details). In order to switch off
1 confirmation for DOS files, use `-o'.
1
1 `m'
1 Preserve the file modification time.
1
1 `v'
1 Verbose. Displays the name of each file as it is copied.
1
1 4.8.1 Bugs
1 ----------
1
1 Unlike MS-DOS, the '+' operator (append) from MS-DOS is not supported.
1 However, you may use `mtype' to produce the same effect:
1 mtype a:file1 a:file2 a:file3 >unixfile
1 mtype a:file1 a:file2 a:file3 | mcopy - a:msdosfile
1