用pushd运行bat文件

时间:2015-11-25 11:16:02

标签: batch-file jenkins

我在Jenkins中使用批处理脚本

执行此操作
pushd \\NXXXX.xxxx.se\XX\XXXXXInstaller\
echo "Startar installation..."
dir
Installera_XXXXX.bat
popd

问题是它不会启动bat脚本。为什么呢?

一切似乎都很好。即使是dir工作正常,但后来我得到: 系统找不到指定的路径。

12:28:24 E:\WS\Jenkins\workspace\Test136>pushd     \\NXXXXXX.XXXXX.se\XXXXX\XXXXXInstaller 
12:28:24 
12:28:24 Z:\XXXXXInstaller>echo "Startar installation..." 
12:28:24 "Startar installation..."
12:28:24 
12:28:24 Z:\XXXXXInstaller>dir
12:28:24  Volume in drive Z is Drive-E
12:28:24  Volume Serial Number is 2466-A05A
12:28:24 
12:28:24  Directory of Z:\XXXXXInstaller
12:28:24 
12:28:24 2015-11-25  10:12    <DIR>          .
12:28:24 2015-11-25  10:12    <DIR>          ..
12:28:24 2010-11-18  20:27           587ÿ776 7za.exe
12:28:24 2015-09-24  09:14               402 Installera_XXXXX.bat
12:28:24                2 File(s)        588ÿ178 bytes
12:28:24                2 Dir(s)   2ÿ561ÿ781ÿ760 bytes free
12:28:24 
12:28:24 Z:\XXXXXInstaller>Installera_XXXXX.bat
12:28:24 The system cannot find the path specified.
12:28:24 File Not Found

0 个答案:

没有答案