Windows – Why does Hudson not recognize xcopy as a command

hudsonwindowsxcopy

I have a windows batch command in my hudson build step that is basically:

 xcopy /s *.* \\serverlocation\buildname\

The copy is failing with:

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

However, xcopy is usable on the command line (as is copy). What do I need to do to make hudson use xcopy?

Edit: My path is

PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Perforce;C:\Program Files\CVSNT;C:\Program Files\CVSNT\

which is probably why it works from the command line.

Best Answer

xcopy is in your system32 directory; make sure that's in your PATH.