事件
4月29日 下午2時 - 4月30日 下午7時
Join the ultimate Windows Server virtual event April 29-30 for deep-dive technical sessions and live Q&A with Microsoft engineers.
Sign up now暫停批處理批次程序,顯示提示,Press any key to continue . . .
pause
參數 | 說明 |
---|---|
/? | 在命令提示字元中顯示說明。 |
如果您按 CTRL+C 停止批次程式,則會出現下列訊息,Terminate batch job (Y/N)?
。 如果您在回應此訊息時按下 Y (若為 yes),批次程式會結束和控制會傳回作系統。
您可以在您可能不想處理的批處理檔區段之前,插入 暫停 命令。 當 暫停 暫停批次程式時,您可以按 CTRL+C,然後按 Y 來停止批次程式。
若要建立批次程式,提示使用者在其中一個磁碟驅動器中變更磁碟,請輸入:
@echo off
:Begin
copy a:*.*
echo Put a new disk into Drive A
pause
goto begin
在此範例中,磁碟驅動器 A 中磁碟上的所有檔案都會複製到目前目錄。 當訊息提示您將新的磁碟放在磁碟驅動器 A 之後,暫停 命令暫停處理,以便您可以變更磁碟,然後按任何按鍵以繼續處理。 此批次程式會在無休止的迴圈中執行—goto begin 命令會將命令解釋器傳送至批處理檔的 Begin 標籤。
事件
4月29日 下午2時 - 4月30日 下午7時
Join the ultimate Windows Server virtual event April 29-30 for deep-dive technical sessions and live Q&A with Microsoft engineers.
Sign up now