2011-10-13 92 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

非常感謝你許多。像魅力一樣工作。願你的鬍子變得更長! :) –

相關問題