copy

Windows CMD · Files · available in the simulator

What it does

Copies files to another folder. Wildcards: * and ?.

Syntax

copy [/y|/-y] [/a|/b] origen [+ origen2...] [destino]

Options and parameters

  • /y

    suppresses prompting before overwriting

  • /-y

    prompts before overwriting

  • /v

    verifies the copy

  • /b

    binary mode

  • /a

    ASCII mode

  • /Y

    Suppresses prompting to confirm overwriting destination files.

    copy /y *.txt backup\
  • /-Y

    Prompts for confirmation before overwriting destination files.

  • /A

    Treats the file as ASCII text.

  • /B

    Treats the file as binary.

  • /D

    Allows the destination file to be created decrypted.

  • /V

    Verifies that files are written correctly.

  • /N

    Uses 8.3 short file names when copying.

  • /Z

    Copies network files in restartable mode.

  • /L

    If source is a symbolic link, copies the link instead of the target.

Usage examples

  • copy "c:\users\admin\desktop\mi foto.jpg" c:\temp
  • copy "c:\users\admin\desktop\mi foto.jpg" c:\temp\foto.jpg
  • copy c:\windows\system32\*.exe c:\users\admin\documents
  • copy con fichero.txt
  • copy a.txt+b.txt c.txt
  • copy archivo.txt copia.txt
  • copy /Y *.txt backup\
  • copy /y *.txt backup\

Notes and common mistakes

  • copy origen1+origen2 destino concatenates files.
Practise copy

Related commands