blank.gif (43 bytes)

Church Of The
Swimming Elephant




Copying to and from devices

You can substitute a device name for one or more occurrences of source or for destination.

Using or omitting the /b switch when copying to a device

When destination is a device (for example, COM1 or LPT1), the /b switch causes Windows NT to copy data to the device in binary mode. In binary mode, all characters (including such special characters as CTRL+C, CTRL+S, CTRL+Z, and carriage return) are copied to the device as data. Whereas, omission of the /b switch causes Windows NT to copy data to the device in ASCII mode. In ASCII mode, such special characters as those previously listed may cause Windows NT to take special action during the copying process, such as

Using the default destination file

If you do not specify a destination file, Windows NT creates a copy with the same name, creation date, and creation time as the original file, placing the new copy in the current directory on the current drive. If the source file is on the current drive and in the current directory and you do not specify a different drive or directory for the destination file, the copy command stops and Windows NT displays the following error message:

File cannot be copied onto itself
0 File(s) copied

Using the /v switch

If Windows NT cannot verify a write operation, it displays an error message. 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 Windows NT must check each sector recorded on the disk.

Using the /a and /b switches

The effect of an /a or /b switch depends upon its position on the command line. When the /a or /b switch follows the source filename, copy performs as shown in the following list:

/a Treats the file as an ASCII (text) file and copies data that precedes the first end-of-file character. Copy does not copy the first end-of-file character or the remainder of the file.

/b Copies the entire file, including any end-of-file character.

When the /a or /b switch follows the destination filename, copy performs as shown in the following list:

/a Adds an end-of-file character as the last character of the file.

/b Does not add an end-of-file character.

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 in source but specify a single 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.

Copying files in subdirectories

To copy all of a directory's files and subdirectories, you should 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+,,

More Information About Copy

ntcmds00000001.gif Copy--Examples

ntcmds00000001.gif Copy


Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

Have you gone to church today?
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609