Cannot Access Folder Because the Path Is Too Long or Deep

ID: Q180410


The information in this article applies to:
  • Microsoft Windows NT Server, Enterprise Edition version 4.0
  • Microsoft Windows NT Server versions 3.51, 4.0
  • Microsoft Windows NT Workstation versions 3.51, 4.0
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server


SYMPTOMS

When you attempt to open, delete, or rename a folder using Windows NT Explorer or File Manager, you may receive one of the following error messages:

  • Cannot delete folder - path too Deep


  • Can't access this folder.
    Path is too long


Some third-party anti-virus and tape backup programs may be unable to access files or folders with paths that are too long.


CAUSE

This problem can occur if the path to the file or folder is longer than the file system can accommodate. For example, this problem may occur if you connect a drive to a share and then create a path over 255 characters to the share.


RESOLUTION

To work around this issue, you can use the SUBST command to associate a drive letter with the long path to access the file or folder. To do so, follow these steps:

  1. At a command prompt, change to the parent folder containing the file or folder you are attempting use.


  2. To assign a drive letter to the location, type the following command

    subst <drive>:

    where <drive> is an available drive letter and "." is a period, indicating the current folder.


  3. Type exit, and then press ENTER.


NOTE: You can remove the virtual drive letter by typing subst <drive>: /d at a command prompt.

You can also work around this issue by connecting recursively to the share on the server and using a drive letter to point to the share.


MORE INFORMATION

The hard disk's file system determines the maximum number of characters in the path to a file or folder from the Win32 API variable MAX_PATH. The File Allocation Table (FAT) for MS-DOS, Protected-Mode FAT (VFAT) for Windows 95, and NT File System (NTFS) file systems are usually limited to 255 characters in a path.


REFERENCES

For more information about this issue, please see the following articles in the Microsoft Knowledge Base:

ARTICLE-ID: Q157069
TITLE : "Can't Access This Folder. Path Is Too Long" Error

ARTICLE-ID: Q177665
TITLE : Path Too Long Error Message When Exceeding MAX_PATH


For more information about the Win32 API MAX_PATH variable, see the following Microsoft Web site:

http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/techart/msdn_longfile.htm

Additional query words: 256 longfilename

Keywords : kbenv NTSrvWkst
Version : WINDOWS:2000; winnt:3.51,4.0
Platform : WINDOWS winnt
Issue type : kbinfo


Last Reviewed: January 25, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.