将源驱动器中软盘的内容复制到目标驱动器中的格式化或未格式化软盘。 If used without parameters, diskcopy uses the current drive for the source disk and the destination disk.
Syntax
diskcopy [<drive1>: [<drive2>:]] [/v]
Parameters
Parameter | Description |
---|---|
<drive1> |
指定包含源磁盘的驱动器。 |
/v | 验证是否已正确复制信息。 此选项会降低复制过程的速度。 |
/? | 在命令提示符下显示帮助。 |
Remarks
Diskcopy works only with removable disks such as floppy disks, which must be the same type. You cannot use diskcopy with a hard disk. If you specify a hard disk drive for drive1 or drive2, diskcopy displays the following error message:
Invalid drive specification Specified drive does not exist or is nonremovable
The diskcopy command prompts you to insert the source and destination disks and waits for you to press any key on the keyboard before continuing.
After it copies the disk, diskcopy displays the following message:
Copy another diskette (Y/N)?
If you press Y, diskcopy prompts you to insert source and destination disks for the next copy operation. To stop the diskcopy process, press N.
If you're copying to an unformatted floppy disk in drive2, diskcopy formats the disk with the same number of sides and sectors per track as are on the disk in drive1. Diskcopy displays the following message while it formats the disk and copies the files:
Formatting while copying
If the source disk has a volume serial number, diskcopy creates a new volume serial number for the destination disk and displays the number when the copy operation is complete.
If you omit the drive2 parameter, diskcopy uses the current drive as the destination drive. If you omit both drive parameters, diskcopy uses the current drive for both. If the current drive is the same as drive1, diskcopy prompts you to swap disks as necessary.
Run diskcopy from a drive other than the floppy disk drive, for example the C drive. If floppy disk drive1 and floppy disk drive2 are the same, diskcopy prompts you to switch disks. If the disks contain more information than the available memory can hold, diskcopy cannot read all of the information at once. Diskcopy reads from the source disk, writes to the destination disk, and prompts you to insert the source disk again. 此过程将继续执行,直到复制了整个磁盘。
碎片是磁盘上现有文件之间存在未使用的磁盘空间小区域。 碎片源磁盘可能会减慢查找、读取或写入文件的过程。
Because diskcopy makes an exact copy of the source disk on the destination disk, any fragmentation on the source disk is transferred to the destination disk. To avoid transferring fragmentation from one disk to another, use the copy command or the xcopy command to copy your disk. Because copy and xcopy copy files sequentially, the new disk is not fragmented.
Note
You cannot use xcopy to copy a startup disk.
diskcopy exit codes:
Exit code Description 0 复制作成功 1 发生非严重读取/写入错误 3 发生了致命的硬错误 4 初始化错误发生 To process the exit codes that are returned by diskcomp, you can use the ERRORLEVEL environment variable on the if command line in a batch program.
Examples
若要将驱动器 B 中的磁盘复制到驱动器 A 中的磁盘,请键入:
diskcopy b: a:
若要使用软盘驱动器 A 将一个软盘复制到另一个软盘,请先切换到 C 驱动器,然后键入:
diskcopy a: a: