KOMPX.COM or COMPMISCELLANEA.COM   

Copy the contents of one file to another (Windows Command Prompt)

Copying the contents of one file to another in Windows Command Prompt (CMD). Two variants:

  1. Copying by TYPE command
  2. Copying by COPY command

Copy by TYPE command


TYPE "FILE1.txt" > "FILE2.txt"

Copy by COPY command


COPY /Y "FILE1.TXT" "FILE2.TXT"

Note: The /Y switch of COPY command is used to suppress the "Overwrite FILE2.TXT? (Yes/No/All):" confirmation prompt.

Links

  1. TYPE ss64.com/nt/type.html
  2. COPY ss64.com/nt/copy.html

Operating systems

More