Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

徵狀

當您從包含非字母字元的其他資料夾執行批次檔案時,您會收到下列錯誤訊息:

指定的名稱未被識別為內部或外部命令、可執行檔程式或批次檔案。

再現問題的步驟:

  1. 從您的根目錄開始,建立名為 test (2)的資料夾。

  2. 在稱為 test 的 test (2)資料夾中建立批次檔案。

  3. 在 test. bat 中插入下列行:

          echo off      pause
  4. 儲存測試 bat。

  5. 在命令提示字元的根目錄中,以下列行執行批次處理檔案:\test(2)\test.bat

請注意,收到錯誤訊息:

指定的名稱未被識別為內部或外部命令、可執行檔程式或批次檔案。

因應措施

雖然批檔案不會從根目錄執行,但如果您將命令列括在引號內,命令就會執行。 例如,在上述情況下,使用者應該在命令提示字元中輸入下列行: "\test(2)\test.bat" 這個命令會正常執行批次處理檔案。

狀態

Microsoft 已確認這是 Windows NT 版本4.0 中的問題。 我們正在研究這個問題,並會在 Microsoft 知識庫中張貼新的資訊,因為它變為可用。

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×