I recently encountered an error where XCOPY wouldn't work in a batch file returning:
'xcopy' is not recognized as an internal or external command, operable program, or batch file.
Several other commands (ie: HELP) returned the same error, which I discovered was due to where %SYSTEMROOT%\SYSTEM32 was defined in the path variable. It was burried in the middle, but moving it to the beginning fixed this issue.
I do not understand why other commands (ie: MKDIR in the same batch file) are still recognized when the other commands aren't. Are these defined elsewhere in the OS in a way that makes them always accessable?
Setup is Windows XP Professional 2002 SP3, 32-Bit running in Oracle VM VirtualBox.