Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Batch file error: "xcopy is not recognized as an internal or external command..."

I'm programming a batch file and after a long amount of code, I have:

:d1copy
xcopy /Y "C:\Users\Joseph\Desktop\JOKO_Sync\*.*" "F:\JOKO_Sync\*.*" /s /e /V /D
pause

When I execute this, I get the error

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

Yet I copy and paste this same code into another batch file, and it works perfectly.

Any ideas?

like image 996
JSUPRA Avatar asked Dec 03 '22 19:12

JSUPRA


1 Answers

Your Path environment variable doesn't contain C:\Windows\System32. Please try adding it and your error will be resolved!

like image 165
Am_I_Helpful Avatar answered Dec 26 '22 13:12

Am_I_Helpful