by Sai gowtham

How to fix the 'cp' is not recognized as an internal or external command

In this tutorial, we are going to learn about how to fix the cp is not recognized as an internal or external command issue.

When we try to copy a file from one directory to another using the cp command in windows os, we will see this type of error is displayed in our command line.

cp src\app.js public\app.js

Output:

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

This error is occurred due to the cp command is not available in windows os. It is only available in Linux based operating systems.

To fix the error, replace the cp with windows copy command and run it:

copy src\app.js public\app.js

Top Udemy Courses

JavaScript - The Complete Guide 2020 (Beginner + Advanced)
JavaScript - The Complete Guide 2020 (Beginner + Advanced)
45,614 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
284,472 students enrolled
40 hours of video content
View Course
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
130,921 students enrolled
21 hours of video content
View Course