Windows 为什么Hudson不承认xcopy是一个命令?

Windows 为什么Hudson不承认xcopy是一个命令?,windows,hudson,xcopy,Windows,Hudson,Xcopy,我在hudson构建步骤中有一个windows批处理命令,基本上是: xcopy /s *.* \\serverlocation\buildname\ 副本失败,原因是: 'xcopy' is not recognized as an internal or external command, operable program or batch file. 但是,xcopy可以在命令行上使用(与copy一样)。我需要做什么才能让哈德逊使用xcopy 编辑:我的路径是 PATH=C:\WIN

我在hudson构建步骤中有一个windows批处理命令,基本上是:

 xcopy /s *.* \\serverlocation\buildname\
副本失败,原因是:

'xcopy' is not recognized as an internal or external command, operable program or batch file.
但是,xcopy可以在命令行上使用(与copy一样)。我需要做什么才能让哈德逊使用xcopy

编辑:我的路径是

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

这可能就是它从命令行工作的原因。

xcopy
位于您的
system32
目录中;确保在您的
路径中

在Hudson(或其他构建系统)中使用Xcopy时,您可能需要注意的是要复制的文件路径的总长度


在我的例子中,我在使用xcopy复制目录结构中许多级别的文件时遇到了问题,因此当与Hudson的工作/构建路径级别结合使用时,它(我假设)超过了xcopy可以使用的最大允许路径长度。我目前的解决办法是在复制生成输出之前简单地压缩它,但我正在寻找更干净的东西。

PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ProgramFiles\Performance;C:\ProgramFiles\CVSNT;C:\Program Files\CVSNT\这是来自Hudson还是来自命令行的路径?只是想看看我是不是选对了树。:-)说得好。我将把“C:\windows\system32\xcopy”改为“xcopy”,看看这是否有效…aaaaa nnnnddddd。。。这就是问题所在。伙计,我觉得很害羞。