文章編號: 177665 - 上次校閱: 2006年10月31日 - 版次: 1.3

當超過 MAX_PATH 的路徑太長的錯誤訊息

系統提示本文適用於您使用的作業系統之外的作業系統。與您不相關的文章內容已停用。
全部展開 | 全部摺疊

徵狀

Windows 95 和 Windows NT 4.0 用戶端可以展開超過 MAX_PATH 的伺服器目錄結構 (256 個字元) 存取伺服器共用,並建立目錄和檔案透過網路。

如此一來執行 Windows NT 4.0 伺服器傳回下列的錯誤訊息,如果伺服器管理員嘗試透過 Windows NT 檔案總管存取這些檔案或從本機伺服器上的目錄:
無法存取此資料夾。
路徑過長。
如果您嘗試建立新的資料夾,可能會收到下列錯誤訊息:
無法建立資料夾 '<name>'。
檔名或副檔名過長。
執行 Windows NT 3.51 的伺服器顯示非預期的結果在 「 檔案管理員 」 中如一般保護性錯誤 (GP 錯誤)、 WINFILE 損毀或不存在的目錄的顯示。

數個工具和程式可能也問題時顯示使用超過 MAX_PATH 此目錄結構。

發生的原因

因為 MAX_PATH 變數的 Win32 程式受限於 256 個字元的字串大小限制。藉由傳遞 Win32 MAX_PATH 的路徑或更少的軟體程式可以解決這個問題。真實基礎路徑可以再存取獨立的真實路徑的長度。在這種程式可以存取的檔案或超過 MAX_PATH 的目錄伺服器上。

解決方案

若要解決問題,在目錄結構超過 MAX_PATH,使用下列方法之一:
  • 伺服器 (包含長的目錄結構上, 請透過一個本機 (net use 」 或 subst 」) 的重新導向之相同共用/網路用戶端存取資料夾在網路上存取這些檔案和資料夾。
  • 在 Windows NT 檔案總管選取之資料夾上一層資料夾,會傳回錯誤的。傳回錯誤的資料夾上按一下滑鼠右鍵,然後按一下 [重新命名]。重新命名資料夾,以減少的資料夾名稱中使用的字元數。

其他相關資訊

上面所述的問題可能無法重現與 NTBACKUP 和檔案和目錄已超過 MAX_PATH 限制可能會備份並已順利還原。

這篇文章中的資訊適用於:
  • Microsoft Windows NT Workstation 3.51
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Server 3.51
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Home Edition (家用版)
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows Advanced Server, Limited Edition
  • Microsoft Windows Datacenter Server Limited Edition
  • Windows Vista 家用入門 64 位元版
  • Windows Vista 家用進階 64 位元版
  • Windows Vista 旗艦 64 位元版
  • Windows Vista 商用入門版
  • Windows Vista 商用入門 64 位元版
  • Windows Vista 商用進階版
  • Windows Vista 家用進階版
  • Windows Vista 旗艦版
  • Microsoft Windows Server 2003 R2 Datacenter Edition (32-Bit x86)
  • Microsoft Windows Server 2003 R2 Datacenter x64 Edition
  • Microsoft Windows Server 2003 R2 Enterprise Edition (32-Bit x86)
  • Microsoft Windows Server 2003 R2 Enterprise x64 Edition
  • Microsoft Windows Server 2003 R2 Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003 R2 Standard x64 Edition
  • Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Small Business Server 2003 Premium Edition
關鍵字:?
kbmt kberrmsg kbnofix kbprb kbui KB177665 KbMtzh
機器翻譯機器翻譯
重要:本文是以 Microsoft 機器翻譯軟體翻譯而成,而非使用人工翻譯而成。Microsoft 同時提供使用者人工翻譯及機器翻譯兩個版本的文章,讓使用者可以依其使用語言使用知識庫中的所有文章。但是,機器翻譯的文章可能不盡完美。這些文章中也可能出現拼字、語意或文法上的錯誤,就像外國人在使用本國語言時可能發生的錯誤。Microsoft 不為內容的翻譯錯誤或客戶對該內容的使用所產生的任何錯誤或損害負責。Microsoft也同時將不斷地就機器翻譯軟體進行更新。
按一下這裡查看此文章的英文版本:177665? (http://support.microsoft.com/kb/177665/en-us/ )
Microsoft及(或)其供應商不就任何在本伺服器上發表的文字資料及其相關圖表資訊的恰當性作任何承諾。所有文字資料及其相關圖表均以「現狀」供應,不負任何擔保責任。Microsoft及(或)其供應商謹此聲明,不負任何對與此資訊有關之擔保責任,包括關於適售性、適用於某一特定用途、權利或不侵權的明示或默示擔保責任。Microsoft及(或)其供應商無論如何不對因或與使用本伺服器上資訊或與資訊的實行有關而引起的契約、過失或其他侵權行為之訴訟中的特別的、間接的、衍生性的損害或任何因使用而喪失所導致的之損害、資料或利潤負任何責任。