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.
xcopy
is in your system32
directory; make sure that's in your PATH
.
Something you may want to watch out for when using Xcopy with Hudson (or other build systems really) is the total length of the path of the file being copied.
In my case, I'm running into issues using xcopy to copy files that are buried many levels down in a directory structure such that when combined with Hudson's working/build path level, it (I'm assuming) exceeds the maximum allowable path length for xcopy to work with. My current work-around is to simply zip build output before copying it, but I'm looking for something a little cleaner.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With