Jump to content
CCleaner Community Forums

Path Length > 260 chars Restore issue


Recommended Posts

If the path length of the file to be restored is longer then 260 chars("X:\<256char path+filename><NUL>") you get the error "The system cannot find the path specified".


A better error message would be "The length of the target path+filename exceeds 256 chars".


Or even better, add support(option in advanced settings maybe?) in Recuva to support creation of path length of 32000(dont remeber exact length) chars("\\?\X:\<32000char path+filename>").

The reason for the settings option is preferable since the very long path isn't widely supported.

Link to post
Share on other sites
  • Moderators

Windows doesn't allow path names longer than 260


or actually


The following is the File Path + Name limit in various Windows operating system versions:


Windows Vista / Windows 7 /Windows Server 2008


Path limit is 248 characters.

Path+Filename limit is 260 characters


Windows xp /2003


Path+Filename limit is 255 characters


Windows 2000


Path+Filename limit is 254 Characters


Source: http://www.windowsreference.com/windows-20...ons-in-windows/

Link to post
Share on other sites
  • Moderators

from the link you gave me

first paragraph

In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is "D:\<some 256 character path string><NUL>" where "<NUL>" represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string.)
Link to post
Share on other sites
from the link you gave me

first paragraph

yes... and the second paragraph

The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters. This type of path is composed of components separated by backslashes, each up to the value returned in the lpMaximumComponentLength parameter of the GetVolumeInformation function (this value is commonly 255 characters). To specify an extended-length path, use the "\\?\" prefix. For example, "\\?\D:\<very long path>". (The characters < > are used here for visual clarity and cannot be part of a valid path string.)

and a few lines below that..

The shell and the file system have different requirements. It is possible to create a path with the Windows API that the shell user interface might not be able to interpret properly.

For this reason the support for this should be an option in settings...

Explorer in Windows 7 64bit has no problem entering folder-structures that have many hundreds(only tested upto 1020chars, cause my filemanager seem to not support longer paths) of total chars, max length per single directory is 255chars it seems... Explorer in Windows XP 32bit complain about not finding the files/folders....

I could not have any of the Explorer versions create such a folder-structure though...

The structure I tested with was:















Link to post
Share on other sites
  • 5 years later...


This topic is now archived and is closed to further replies.

  • Create New...