Diskcopy command in Windows

The diskcopy command copies the contents of the floppy disk in the source drive to a floppy that has been formatted or not formatted in the destination drive. If used without parameters, the diskcopy command uses the current drive for the source disk and the destination disk.

The diskcopy command copies the contents of the floppy disk in the source drive to a floppy that has been formatted or not formatted in the destination drive. If used without parameters, the diskcopy command uses the current drive for the source disk and the destination disk.

To learn how to use this command, please see the Example below.

Note : This command is not available in Windows 10.

Syntax diskcopy command

 diskcopy [: [:]] [/v] 

Parameters

ParameterDescription Specifies the drive that contains the source disk. Specify the drive that contains the target disk. / v Verify that the information is copied correctly. This option slows down the copy process. /? Show help at the command prompt.

Note

  1. Use the disk

Diskcopy only works with removable disks such as floppy disks and must be of the same type. You cannot use the diskcopy command with a hard disk. If you specify the hard disk for Drive1 or Drive2, the diskcopy command will display the following error message:

 Invalid drive specification Specified drive does not exist or is nonremovable 

The diskcopy command will prompt you to insert the source disk and the destination disk, then wait for you to press any key on the keyboard before continuing.

After copying the disk, the diskcopy command will display the following message:

 Copy another diskette (Y/N)? 

If you click Y , the diskcopy command will prompt you to insert the source disk and the target disk for the next copy operation. To stop disk copying, press N.

If you are copying to an unformatted floppy disk in Drive2, the diskcopy command will format this disk with the same number of faces and sections on each track as on disk in Drive1. Diskcopy displays the following message while formatting the disk and copying files:

 Formatting while copying 
  1. Disk serial number

If the source disk has a serial number, the diskcopy command will create a new serial number for the target disk and display the number when the copy operation is complete.

  1. Ignore the disk parameters

If you omit the Drive2 parameter , the diskcopy command will use the current drive as the destination drive. If you omit both disk parameters, the diskcopy command will use the current drive for both the source disk and the destination disk. If the current drive is the same as Drive1, the diskcopy command will prompt you to swap the disk as needed.

  1. Use a drive to copy

Run the disk from the drive other than the floppy drive, for example drive C. If the floppy disk Drive1 and the Drive2 floppy are the same, the diskcopy command will prompt you to convert the disk. If the disk contains more information than available memory, the diskcopy command cannot read all the information at once. Diskcopy reads from the source disk, writes to the target disk and prompts you to re-insert the source disk. This process continues until you have copied the entire disk.

  1. Avoid disk fragmentation

Fragmentation is the presence of small areas of unused disk space between existing files on the disk. Fragmented source disks can slow down the process of searching, reading or writing files.

Because the diskcopy command creates an exact copy of the source disk on the destination disk, any fragments that are on the source disk are moved to the destination disk. To avoid fragmentation from one disk to another, use the copy or xcopy command to copy your disk. Because the copy and xcopy commands copy the files sequentially, the new disk is not fragmented.

Note : You cannot use xcopy to copy the boot disk.

  1. Find out the exit code of the diskcopy command

The following table explains each exit code returned by the diskcomp command:

Exit code Description 0 Copy operation was successful. 1 A serious read / write error has occurred. 3 A fatal error has occurred. 4 An initial error has occurred.

To process exit code returned by the diskcomp command, you can use the environment variable ERRORLEVEL on the if statement in the batch program.

For example

To copy the disk in drive B to disk in drive A, enter:

 diskcopy b: a: 

To use floppy drive A to copy a floppy disk to another drive, first switch to drive C and then enter:

 diskcopy a: a: 

See more:

  1. Diskcomp command in Windows
  2. Use DiskPart to format and clean up your removable hard drive on Windows 10
  3. Defrag command in Windows
4.3 ★ | 23 Vote