Reputation: 63
The code in batch file is :XCOPY "D:\hosts" "C:\Windows\System32\Drivers\etc" /R /Y
. But it doesn't work. cmd run like :
How do I fix this?
Upvotes: 0
Views: 819
Reputation: 881083
Based on the output, I'd say you've called your batch file xcopy.cmd
or `xcopy.bat.
That means, when it tries to call the actual xcopy
executable, it instead calls itself in an infinitely recursive loop.
If that is the case, you have a couple of options:
copy_hosts.cmd
, something that's not likely to clash with a real command; orxcopy.exe
explicitly from your batch file, so it goes and gets the real one.Upvotes: 1