CP command prompt Windows 7 not recognized [closed]
Asked Answered
V

4

36

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?

Vasileior answered 12/2, 2014 at 16:54 Comment(2)
cp is unix, here is a useful link that gives common translations between unix and windows,Entanglement
chcp is a command to alter the code page. Is that what you meant?Spaceband
P
14

it is a unix/linux command. Download the cygwin package from cygwin.com

Penland answered 12/2, 2014 at 17:14 Comment(2)
One can also use PowerShell to use cp in WindowsZither
You don't need cygwin for this. You can use the Gnu-Win32 packages. Works without cygwin.Percolation
S
56

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).

Scauper answered 12/2, 2014 at 16:57 Comment(4)
There must be something as I've been able to run the command as "cp" on a windows server beforeVasileior
Oh, well... sorry then. I've never seen it. But maybe it was Cygwin, MinGW or something like that? I use Cygwin and really like it.Scauper
Btw, I just confirmed you can use cp from Windows prompt if you have Cygwin installed. And it also has rsync, which is a far more complete tool if you're not just copying one file around (e.g. backup purposes).Scauper
Cygwin has bunch of packages to select from when installing. Which should be selected? i.imgur.com/Fvb6d3o.pngCameral
P
14

it is a unix/linux command. Download the cygwin package from cygwin.com

Penland answered 12/2, 2014 at 17:14 Comment(2)
One can also use PowerShell to use cp in WindowsZither
You don't need cygwin for this. You can use the Gnu-Win32 packages. Works without cygwin.Percolation
P
3

There's a way to do run cp without cygwin and powershell and without admin rights.

Download the respective package (CoreUtils) from the Gnu-Win32 package repository.

You need the zipped binaries and the zipped dependencies. Unpack, and copy bin from deps to bin from coreutils.

Now add the bin folder to the path environment variable (system or user, depending on if you're admin or not), and open a new console. Type cp, and you'll see standard cp command output.

Percolation answered 8/8, 2019 at 12:51 Comment(0)
M
0

use cp of git , is good ! download here : https://git-scm.com/

Medieval answered 19/3, 2022 at 19:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.