Collection
zero Useful+1
zero

copy

Computer terminology
open 3 entries with the same name
COPY is the most commonly used copy command in DOS. DOS When using a COPY command copy Several file commands. A command that is easy to see. It is used to copy files. The usage is very simple: copy the destination path of the source file.
Copy is a very basic DOS command , which may have been rarely used, but as a very important basic command, it still needs to be mastered. The above description of the COPY command is purely for Windows. Since you enter COPY/? In cmd? Then what's the real effect of the above? For this kind of professional command, I think it is better to give more examples for beginners to understand.
Chinese name
Copy
Foreign name
COPY
Role
Copy File
Nature
Computer terminology

DOS command

Announce
edit

Usage command

COPY [/D [1] ] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
[+ source [/A | /B] [+ ...]] [destination [/A | /B]]
Source specifies the file to copy.
/A represents an ASCII text file.
/B represents a binary file/ D Allow decryption of the target file to be created
Destination Specifies the directory and/or file name for the new file.
/V Verify that the new file is written correctly.
/N When copying files with names other than 8dot3,
Use short file names whenever possible.
/Y Do not use Confirm whether to overwrite the existing Destination file Tips for.
/-Y Use the prompt to confirm whether to overwrite the existing target file. [2]
/Z Copies networked files in restartable mode. The command line switch/Y can be used in COPYCMD environment variable Is preset in. This may be replaced by/- Y on the command line. Unless the COPY command is in a Batch processing If it is executed in the script, the default value should be prompt when overwriting. To attach a file, specify one file for the target and several files for the source (use wildcard Or file1+file2+file3 format).
First, create a file on my computer's disk D, such as 1.txt, and write some data in it. Another interconnected machine, called test, has a Shared Folders tool, Of course, users' permissions on test and shared folders should be enabled.
1. Copy a file in a disk in a machine: command copy D: 1.txt D: 2.txt Note that the latter 2.txt cannot be omitted. Omission defaults to creating a file with the same original file name, so it cannot be implemented.
2. Copy files between different disks in a machine: command copy D: 1.txt E: then you will see the copied 1.txt on disk E.
3. File copying between different machines: equivalent to uploading and downloading [3]
Upload command copy D: 1.txt \\test\D$ Then you can see 1.txt on disk D of the test machine;
You can also enter: copy D: 1.txt \\test\tool So in Shared Folders You can also see 1.txt in the tool.
To download the command, first create the file 2.txt on disk D of test, and then create a 3.txt in tool
Enter copy \\test\D$\ 2. txt D: to download the 2. txt of disk D on test to the local disk D
Enter copy \\test\ Tool 3.txt D: Download 3.txt from the tool folder to the local disk D
Note: D: and D: are the same when they are not followed by subdirectories. [4]
Illustration
Example 1: Copy the file Memo.doc to Letter.doc in the current directory.
Execute the following command: copy memo.doc letter.doc
Example 2: To copy the file Memo.doc from the current directory of the current drive to the existing directory System on drive C.
Execute the following
Command: copy Memo.doc c: system
If the System directory does not exist, the Memo.doc file will be copied to the Disk root directory Under the file named System.
Example 3: To merge Mar89.zip, Apr89.zip and May89.zip in the current directory of the current drive, and place them in a file named Report under the current directory of the current drive.
Execute the following command: copy mar89.zip+apr89.zip+may89.zip report
Example 4: To merge all four files into the Report, and already have a file named Report.
Execute the following command: copy report+mar89.rpt+apr89.rpt+may89.rpt
Example 5: In the current directory of the current drive, all files with the. txt extension should be merged into a file named Combin.doc.
Execute the following command: copy *. txt combin.doc
At this time, open the Combin.doc file, and you will find that the file has merged all the contents of the *. txt file into one document.
Example 6: The COPY command combines each file with a. txt extension and its corresponding. ref file. The result is a file with the same file name but a. doc extension. COPY merges File1.txt and File1.ref to form File1.doc, and then copies File2.txt and File2.ref to form File2.doc, and so on.
Execute the following command: copy *. txt+*. ref *. doc
Example 7: To merge all files with the. txt extension, then merge all files with the. ref extension, and put the merge results in the Combin.doc file
Execute the following command: copy *. txt+*. ref combin.doc

Command encryption

Encryption conditions
Prepare an EXE execution file, or a picture document, and a file you want to hide TXT Documents (ZIP and RAR files can also be hidden) must be in the same directory.
Use hello.jpg and 123.txt to explain, save them as gif, and then name them sky. These two files have been placed in the root directory of disk D
Encryption work
After the preparation, enter CMD and use CMD to enter the directory of the files to be merged (enter D: to enter the root directory of disk d). The files are placed in the root directory of disk D, so you can only enter disk D.
Go to the directory and enter: copy/b hello.jpg+123. txt=sky. gif
The copy is successful. The merged file is named sky. Use Picture viewing software Open sky.gif and it looks no different from the original picture, but it is different when you open notepad. Open notepad and drag sky.gif pictures directly into it, and a pile of Garbled code , but it doesn't matter. At this time, type to the end of the document (press Ctrl+End directly). See, the contents at the bottom are those in 123.txt. Is this a good way to hide your privacy. [5]
If the ZIP and RAR compressed package files are hidden, change the suffix of sky.gif to RAR or ZIp to get the hidden compressed package. [6]
Suggestion: first compress the txt file, and then encrypt it into the picture to prevent information corruption.

Supplementary content

Copy c: srv.exe ip * * * $means to copy srv.exe to * * *
Copy ip * * * $ srv.exe c: means to copy the other party's * * * i.exe file to the local c:\
In addition, it is better to leave three blank spaces at the beginning of the text in the 123.txt file to avoid the first few character Overwritten, where the parameter/b is specified as binary Format Copy . Consolidated documents; The parameter/a specifies to copy and merge files in ASCII format. Note the order of files here. Files in binary format should be placed before the plus sign, and files in text format should be placed after the plus sign. [7]