【发布时间】:2011-04-12 19:09:29
【问题描述】:
在reading this post之后,我使用[[ ]]将命令放入系统。问题如下:结构相同:
local Program = [["c:\Archivos de programa\Automated QA\TestComplete 8\Bin\TestComplete.exe" ]];
local testcase = [["C:\svn_test\trunk\Automation\XMM\XMM.pjs" ]];
local options = [[/r /exit /p:XMMGeneralTest /t:"Script|main|Main" ]];
local cmd = Program..testcase..options;
print(cmd);
os.execute(cmd);
local tcLog = [[ C:\svn_test\trunk\Automation\XTYLE\XTyleGeneralTest\Log\11_04_2011_12_40_06_264\*]];
local zippedFile = "11_04_2011_12_40_06_264.7z ";
local sevenZip = [["c:\Archivos de Programa\7-Zip\7z.exe" a -t7z ]];
local cmd = sevenZip..zippedFile..tcLog;
print(cmd);
os.execute(cmd);
相同的代码产生不同的结果。第一个没有运行:
"c:\Archivos" not recognized as internal command or external,
program...
第二个运行完美。
我该如何解决这个问题?
【问题讨论】:
-
我不知道这是否是原因,但在第一种情况下,树字符串之间不需要空格吗?
-
是的,我在编辑这篇文章时错过了这个空格,但这不是这个错误的原因:(
-
我这里没有窗户,所以我无法真正测试这个,抱歉。
标签: lua whitespace