Mcopy can copy a single file to the specified file name, or copy several files to the specified directory. The source and target files can be MSDOS or Linux files.
The mcopy command is an mtools tool command that can copy files in the DOS system or between the DOS and Linux operating systems.
Syntax
Mcopy [-bnmpQt/] [source file] [target file or directory]
Parameters:
B batch processing mode. This is an optimized option for copying a large number of files. However, when a crash occurs during File copying, security issues may occur. /Progressive replication. Contains the files contained in the directory and all the files in its subdirectories.
-N directly overwrites other files without confirmation.
M sets the source file modification time to the modification time of the target file.
P sets the attribute of the source file as the attribute of the target file.
Q When an error occurs when copying multiple files, end the program as soon as possible.
T is converted to a text file.
O no warning message is displayed when the MSDOS file is overwritten.
Instance
Copy autoexec. bat in the root directory of disk A to the current working directory:
Mcopy a: autoexec. bat.
When the copied content includes sub-directories and files, the parameter "-/" must be used for recursion. Therefore, the command is:
Mcopy-/:\*
Run the mdir command to view the original directory structure. After mcopy is executed, run the ls command to view the file structure in Linux. The result is as follows:
Cmd @ cmd-desktop :~ $ Mdir-/a: \ * # View files in disk
Volume in drive A has no label # load information
Volume Serial Number is 13D2 ~ 055C
Directory for A: // # Directory information
# File name directory size modification time
./TEST2009-09-23 16: 59
AUTORUN. INF 265
AUTORUN. BAT 43
3 files 308 bytes # Total statistics size
724 325 bytes free # available space
Cmd @ cmd-desktop :~ $ Mcopy-/A: \ * # Copy all files on disk A to the current working directory.
Cmd @ cmd-desktop :~ $ Ls
Test autorun. inf autorun. BAT # copy the content in disk A to the Linux file system structure