Copy Ü ßßßßß Copies a file or files to another location. This command can be used to combine files. When more than one file is copied, FreeDOS displays each filename as the file is copied. Syntax: COPY [/a|/b] source [/a|/b] [+ source [/a|/b] [+ ..] [destination [/a|/b]] [/v] source The file(s) that are to be copied destination Where the files are going to be copied to. /a Indicates an ASCII text file. An /a preceding filenames on the command line applies to all files that follow it, until copy encounters a /b, which applies to the file preceding it. An /a following a filename applies to the file preceding it and to all files that follow it, until copy encounters /b, which applies to the file preceding it. /b Indicates a binary file. A /b preceding filenames on the command line applies to all files that follow it, until copy encounters an /a switch, which applies to the file preceding it. A /b following a filename applies to the file preceding it and to all files that follow it, until copy encounters an /a, which applies to the file preceding it. /v Verifies the new files are written correctly. Copying to and from devices You can substitute a device name for one or more occurences of source or for destination. Using or omitting the /b switch when copying to a device When destination is a device (e.g. COM1 or LPT1), /b causes FreeDOS to copy data to the device in binary mode, in which all characters (including such special characters as Ctrl+C, Ctrl+S, and Ctrl+Z) are copied to the device as data. Omission of the /b switch causes FreeDOS to copy data to the device in ASCII mode, in which such special characters may cause FreeDOS to take special action during the copying process. Using the /v switch Although recording errors rarely occur with the copy command, the /v switch lets you verify that critical data has been correctly recorded. The /v switch also slows down the copy command, because FreeDOS must check each sector recorded on the disk. Combining files with the copy command If you specify more than one source, separating entries with a plus sign (+), copy combines the files, creating a single file. If you use wildcards all files matching the filename in destination, copy combines all files matching the filename in source and creates a single file with the filename specified in destination. In either case, copy assumes the combined files are ASCII files unless you specify the /b switch. If the name of the destination file is the same as the name of one of the files being copied (except the first file), the original contents of the destination file are lost, and copy displays the following error message: Content of destination lost before copy Copying files in subdirectories To copy all of a directory's files and subdirectories, use the XCopy command. Copying zero-length files Copy does not copy files that are 0 bytes long. Use XCopy to copy these files. Changing the time and date of a file If you want to assign the current time and date to a file without modifying the file, use a command in the following format. The commas indicate the omission of the destination parameter: copy /b source+,, CAUTION: If you combine binary files, the resulting file may not be usable due to internal formatting. See Also: XCopy