2014-02-05 24 views
0

我是批處理文件中的編譯批處理文件,它填充執行當前目錄中的所有c文件。如果建立成功,它會很好。如果構建失敗時出現一些錯誤,那麼也會很好,但只有在構建錯誤時出現錯誤而不是顯示時纔會出現問題。通過顯示----更多-----消息它正在停止並且不會移動到批處理文件中的下一個命令。在批處理文件中編譯時列出所有錯誤的「more」選項

D3LUY2V.c:1682: case label not within a switch statement 
D3LUY2V.c:1685: case label not within a switch statement 
D3LUY2V.c:1699: case label not within a switch statement 
D3LUY2V.c:1703: case label not within a switch statement 
D3LUY2V.c:1706: case label not within a switch statement 
D3LUY2V.c:1709: case label not within a switch statement 
D3LUY2V.c:1712: case label not within a switch statement 
D3LUY2V.c:1715: case label not within a switch statement 
D3LUY2V.c:1718: case label not within a switch statement 
D3LUY2V.c:1724: case label not within a switch statement 
D3LUY2V.c:1730: case label not within a switch statement 
D3LUY2V.c:1736: case label not within a switch statement 
D3LUY2V.c:1744: case label not within a switch statement 
D3LUY2V.c:1945: case label not within a switch statement 
D3LUY2V.c:1948: case label not within a switch statement 
D3LUY2V.c:1966: case label not within a switch statement 
D3LUY2V.c:1970: case label not within a switch statement 
D3LUY2V.c:1974: case label not within a switch statement 
D3LUY2V.c:1978: case label not within a switch statement 
D3LUY2V.c:1981: case label not within a switch statement 
D3LUY2V.c:1984: case label not within a switch statement 
D3LUY2V.c:1987: case label not within a switch statement 
D3LUY2V.c:1993: case label not within a switch statement 
D3LUY2V.c:1999: case label not within a switch statement 
D3LUY2V.c:2005: case label not within a switch statement 
D3LUY2V.c:2013: case label not within a switch statement 
-- MORE -- 

這裏是批處理文件,我正在使用其中mk123456是編譯源文件的批處理。但我不能編輯該批處理文件。此mk123456批處理文件顯示 - more - 如果錯誤更多,如上所示。

@CD %CD% 
@FOR %%* IN (.) DO SET cdir=%%~n* 
SET cpath = %cdir% 
@ECHO **********Copying SourceFiles From Src**************** 
@XCOPY /Q .\Src\*.c  /Y 
@XCOPY /Q .\Src\*.h  /Y 
@ECHO **********Compling %cdir% ******************* 
CALL mk123456 
DEL mk123456.bat 

這是在批處理文件中停止批處理文件的錯誤的屏幕截圖。如果我們輸入「Q」,是否有任何選項可以在批處理文件中跳過此消息並像手動一樣結束,這意味着它將跳過錯誤消息的結尾。如何在批處理文件中跳過這條正在停止批處理文件執行的消息。

+0

如果你顯示批處理文件,這將有所幫助。你可以嘗試'回聲Q |無論|更多' –

+0

我們需要看到批處理文件來幫助。 – 09stephenb

+0

嗨,我編輯了這個問題並添加了批處理文件代碼... –

回答

0

如果你能夠刪除mk123456.bat,那麼我不明白你爲什麼不能編輯它。

但我相信我有一個解決方案給你。我假設你的mk123456.bat腳本的管道輸出爲MORE。如果是這樣,那麼你可以通過改變你的CALL語句來阻止它暫停,如下所示:

CALL mk123456 | findstr "^" 
+0

它的工作。謝謝 –

相關問題