Program: COPYDISK.C C 5.1 and MASM 5.1 Purpose: Copies volume label, subdirectory structure and all files regardless of attribute type from one disk medium to another. Author: Gordon Harris 3349 Humboldt Ave S Minneapolis, MN 55408 Comments can be addressed to my CompuSurve address: [72611,620] Description: COPYDISK is an XCOPY like utility which allows you to copy an entire disk to a drive of differing type, e.g. copy the contents of a 1.2 m floppy to a 1.44 m floppy, etc. Unlike XCOPY, COPYDISK will copy the volume label from the source disk to the target, as well as copying all subdirectories and files including hidden, system or read- only files and directories. All files on the target disk created by COPYDISK will have identical attributes (dates, times, etc) as the files on the source disk. If the source disk is bootable, so will the resulting target disk. Syntax: The syntax for using COPYDISK is: COPYDISK sourcedrive: targetdrive: [-n] [-x] [-f] where "sourcedrive:" and "targetdrive:" are valid dos drives and [-n], [-x] and [-f] are optional parameters. Operation: Given valid parameters, COPYDISK (1) performs a media check on the indicated drives, (2) prompts the user for permission to delete all existing data from the target drive, (3) copies the volume label from the source drive to the target and then (4) proceeds to copy all files and directories from the source to the target. COPYDISK will abort if its check of the media type of the target disk reveals that it is a fixed disk. This protects you from inadvertently deleting the contents of a hard disk either by using an incorrect parameter for the target drive or by using a virtual drive name created by ASSIGN or SUBST which represents a fixed disk drive or subdirectory on a hard disk. During the media check, COPYDISK installs its own critical error handler. If a error is detected reading either the source or target drives, COPYDISK will prompt you to retry access to the disk. If you choose not to retry access to the target disk, COPYDISK will prompt you as to whether you wish to format the target. COPYDISK will also abort if the data on the source disk is too large to fit on the empty target disk, or if any errors occur reading data from the source or writing data to the target disks. Optional Parameters: -n (no prompt). This is useful when using COPYDISK in batch files. With the "-n" parameter, COPYDISK will not prompt you for permission to delete all data from the target disk. -x (relaxed media checking). With this parameter, the target disk may be a hard disk and the source data may be larger than the capacity of the target disk. -f (format target automatically if media check failure). With this parameter, the DOS FORMAT.COM command will be spawned without prompting if the target disk fails the media check.