0
通过批处理脚本调用.exe文件时出现问题。下面是我的批处理脚本代码:通过批处理脚本调用.exe文件时出现问题
@echo off
for /F "tokens=* delims=" %%A in (MyFile.csv) do start " "diffapicmdline.exe /lhscd "/d=localhost:9080 /h=localhost /u=user1 /p=Pwd123 %%A" /rhscd "/d=localhost:9080 /h=localhost /u=user1 /p=Pwd123 Prjct %%A" /t job /ot html /ol "C:\compare_output_H_S_Component.html""
因此,对于每一行MyFile.csv
文件diffapicmdline.exe
应该被称为每次。
但问题是它不识别.exe后的参数。我们是否必须转义字符或找到其他方法来告诉批处理脚本才能成功运行.exe?
错误我收到的位置:
Windows can't find 'diffapicmdline.exe /lhscd "/d=localhost:9080'.
Make sure you typed the name correctly, and then try again.
'你开始“‘’diffapicmdline.exe':这是什么有趣的报价模式是故意 – kebs
你能编辑的问题,并贴上你有错误消息 – kebs
@kebs diffapicmdline.exe是一种实用工具?由IBM提供,用于比较不同主机上的DataStage作业,其目的仅在于其期望的格式,当我在cmd中单独执行相同的工作时,它的工作是完美的,但我希望在批处理脚本中使用相同的作业来自动比较作业。 –