Diskcopy


Applies To: Windows Vista,Windows Server 2008

Copies the contents of the floppy disk in the source drive to a formatted or unformatted floppy disk in the destination drive. If used without parameters, diskcopy uses the current drive for the source disk and the destination disk.

For examples of how to use this command, see Examples.

Syntax


Copy Code

diskcopy [<Drive1>: [<Drive2>:]] [/v]

Parameters

Parameter

Description

<Drive1>

Specifies the drive that contains the source disk.

<Drive2>

Specifies the drive that contains the destination disk.

/v

Verifies that the information is copied correctly. This option slows down the copying process.

/?

Displays help at the command prompt.

Remarks


Copy Code

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 Code

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 are 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:


Copy Code

Formatting while copying

Note

You cannot use xcopy to copy a startup disk.

Exit code

Description

0

Copy operation was successful

1

Nonfatal Read/Write error occurred

3

Fatal hard error occurred

4

Initialization error occurred

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

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


Copy Code

diskcopy b: a:

To use floppy disk drive A to copy one floppy disk to another, first switch to the C drive and then type:

diskcopy a: a:

Additional references

Command-Line Syntax Key