2011-10-13 93 views
1

我已经在命令行中运行以下命令,并已succesfull为什么这个cleartool命令从批处理文件失败?

cleartool find . -type f -exec "cleartool describe -fmt \"Filename:%[name]p:type:%[type]p\n" \"%CLEARCASE_PN%"\"" > D:\temp\type.txt 

我试图把同样的命令在批处理文件,但它无法与follwing输出

cleartool: Error: Bad Command line unterminated quoted string 
cleartool: Error: Can't exec "(null)": the handle is invalid 

灿任何人都请告诉我神奇的线条应该是什么样子?
我可以坚持到一个Perl文件是更容易?

我已经尝试了网站上的各种建议,但我还没有设法解决。

回答

3

你需要增加一倍,你“%”,否则它被认为是由DOS一个“空”字:
(你有一些双引号缺少“\”)

cleartool find . -type f -exec "cleartool describe -fmt \"Filename:%%[name]p:type:%%[type]p\n\" \"%%CLEARCASE_PN%%\"" > D:\temp\type.txt 
+0

非常感谢你许多。像魅力一样工作。愿你的胡子变得更长! :) –

相关问题