CP Command Prompt Windows 7 not recognized

Satch3000 picture Satch3000 · Feb 12, 2014 · Viewed 65.1k times · Source

I am trying to run the command CP at the command prompt on windows 7 but I'm getting:

'cp' is not recognized as an internal or external command, operable program or batch file.

Do I need to install any software to run cp command?

If so what?

Answer

GabrielF picture GabrielF · Feb 12, 2014

By default, there's no cp in Windows Command Prompt (cmd.exe). The equivalent cmd.exe command is copy. cp is a Unix command.

If you can use PowerShell instead, which should come pre-installed in modern Windows systems, you can use cp and some other Unix commands directly in it.

If PowerShell isn't an alternative, you can use cp directly in Windows Command Prompt if you install Cygwin.

Moreover, Cygwin also includes the rsync command, which has many more features than cp, and might be preferable if you're not just copying a single file (e.g. for backup purposes).