blank.gif (43 bytes)

Church Of The
Swimming Elephant

Search:
index.gif

ntcmds00000000.gif

Copy--Examples

The following command copies a file and ensures that an end-of-file character is at the end of the copied file:

copy memo.doc letter.doc /a

To copy a file named ROBIN.TYP from the current drive and directory to an existing directory named BIRDS that is located on drive C, type the following command:

copy robin.typ c:\birds

If the BIRDS directory doesn't exist, Windows NT copies the file ROBIN.TYP into a file named BIRDS that is located in the root directory on the disk in drive C.

To copy several files into one file, list any number of files as source parameters on the copy command line. Separate filenames with a plus sign (+) and specify a filename for the resulting combined file, as the following example shows:

copy mar89.rpt + apr89.rpt + may89.rpt report

This command combines the files named MAR89.RPT, APR89.RPT, and MAY89.RPT from the current drive and directory and places them in a file named REPORT in the current directory on the current drive. When files are combined, the destination file is created with the current date and time. If you omit destination, Windows NT combines the files and stores them under the name of the first specified file. For example, if a file named REPORT already exists, you can use the following command to combine all four files in REPORT:

copy report + mar89.rpt + apr89.rpt + may89.rpt

You can also combine several files into one by using wildcards, as the following example shows:

copy *.txt combin.doc

This command combines all files in the current directory on the current drive that have the extension .TXT into one file named COMBIN.DOC, also in the current directory on the current drive.

If you want to combine several binary files into one by using wildcards, include the /b switch, as the following example shows:

copy /b *.exe combin.exe

This prevents Windows NT from treating CTRL+Z as an end-of-file character.

Caution

If you combine binary files, the resulting file might not be usable due to internal formatting.

In the following example, copy combines each file that has a .TXT extension with its corresponding .REF file. The result is a file with the same filename but with a .DOC extension. Thus, copy combines FILE1.TXT with FILE1.REF to form FILE1.DOC. Then copy combines FILE2.TXT with FILE2.REF to form FILE2.DOC, and so on.

copy *.txt + *.ref *.doc

The following copy command combines first all files with the .TXT extension, then all files with the .REF extension into one file named COMBIN.DOC:

copy *.txt + *.ref combin.doc

More Information About Copy

ntcmds00000001.gif Copy--Notes

ntcmds00000001.gif Copy

Cotse.Net

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

 
.
www.cotse.com
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 Cotse.com.
Cotse.com is a wholly owned subsidiary of Packetderm, LLC.

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