Jump to content


Path Length > 260 chars Restore issue


4 replies to this topic

#1 OFFLINE   sweloop64

    Newbie

  • Members
  • Pip
  • 3 posts
  • Gender:Male
  • Location:Sweden

Posted 07 November 2009 - 11:00 AM

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.

#2 ONLINE   Nergal

    Volunteer CCleaner Demon/Post Meddler

  • Moderators
  • 3,103 posts
  • Gender:Male
  • Interests:SmartPhones

Posted 08 November 2009 - 02:49 AM

Windows doesn't allow path names longer than 260

or actually

Quote

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/
ADVICE FOR USING CCleaner'S REGISTRY INTEGRITY SECTION
DON'T JUST CLEAN EVERYTHING THAT'S CHECKED OFF.
Do your Registry Cleaning in small bits (at the very least Check-mark by Check-mark)
ALWAYS BACKUP THE ENTRY, YOU NEVER KNOW WHAT YOU'LL BREAK IF YOU DON'T.
CCLEANER, RECUVA, DEFRAGGLER AND SPECCY DOCUMENTATION CAN BE FOUND AT www.piriform.com/docs
Link to Winapp2.ini explaination

#3 OFFLINE   sweloop64

    Newbie

  • Members
  • Pip
  • 3 posts
  • Gender:Male
  • Location:Sweden

Posted 08 November 2009 - 11:30 AM

View PostNergal, on Nov 8 2009, 03:49 AM, said:

Windows doesn't allow path names longer than 260

Sure it does... http://msdn.microsoft.com/en-us/library/aa...5).aspx#maxpath

#4 ONLINE   Nergal

    Volunteer CCleaner Demon/Post Meddler

  • Moderators
  • 3,103 posts
  • Gender:Male
  • Interests:SmartPhones

Posted 08 November 2009 - 11:46 PM

View Postsweloop64, on Nov 8 2009, 04:30 AM, said:

from the link you gave me
first paragraph

Quote

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.)

ADVICE FOR USING CCleaner'S REGISTRY INTEGRITY SECTION
DON'T JUST CLEAN EVERYTHING THAT'S CHECKED OFF.
Do your Registry Cleaning in small bits (at the very least Check-mark by Check-mark)
ALWAYS BACKUP THE ENTRY, YOU NEVER KNOW WHAT YOU'LL BREAK IF YOU DON'T.
CCLEANER, RECUVA, DEFRAGGLER AND SPECCY DOCUMENTATION CAN BE FOUND AT www.piriform.com/docs
Link to Winapp2.ini explaination

#5 OFFLINE   sweloop64

    Newbie

  • Members
  • Pip
  • 3 posts
  • Gender:Male
  • Location:Sweden

Posted 09 November 2009 - 04:55 PM

View PostNergal, on Nov 9 2009, 12:46 AM, said:

from the link you gave me
first paragraph
yes... and the second paragraph

Quote

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..

Quote

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:
d:\12345678901234567890123456789012345678901234567890123456789012345678901
23456789012345678901234567890123456789012345678901234567890123456789012345
6789012345678901234567890123456789012345678901234567890
\123456789012345678
90123456789012345678901234567890123456789012345678901234567890123456789012
34567890123456789012345678901234567890123456789012345678901234567890123456
7890123456789012345678901234567890
\123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789012345678901234567890123
45678901234567890123456789012345678901234567890123456789012345678901234567
8901234567890
\123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890123456789012345678901234
5678901234567890123456789012345678901234567890
\123456789012345678901234567
89012345678901234567890123456789012345678901234567890123456789012345678901
23456789012345678901234567890123456789012345678901234567890
\12345678901234
56789012345678901234567890123456789012345678901234567890
\