You are here

Sync can't handle files with pathnames longer than about 250 characters

4 posts / 0 new
Last post
Ichneumon
Offline
Last seen: 12 years 2 months ago
Joined: 2010-12-19 14:40
Sync can't handle files with pathnames longer than about 250 characters

The subject line is self explanatory.

Try copying from a source that has a deeply nested set of folders -- Toucan fails to copy (and produces an error message for) files that have a total pathname of more than about 250 characters.

Try something like:

C:\Files\Fourscore\and\seven\years\ago\our\fourfathers\ [...] \not\perish\from\the\earth.txt

Maximum allowable pathname size on NTFS filesystems (the most common Windows filesystem) is 32767 unicode characters, with the max length of any single folder or filename of 255. I have some that are about 350-ish in length.

For specs on the maximum pathname for various filesystems, see:
http://en.wikipedia.org/wiki/Comparison_of_file_systems

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 10 months ago
Joined: 2007-04-15 21:08
Less in Windows

NTFS allows that long, but Windows itself doesn't allow more than 260 characters in general. (You can create a 256-character path on a share/subst thing to a subdirectory and get a directory that just won't copy with normal techniques.)

Naming Files, Paths, and Namespaces: Maximum Path Length Limitation 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.

Toucan will be using the normal Windows API calls and so it's entirely reasonable for it to not work properly with long paths. There are ways of getting around this, however, and so I suppose that's what you're really asking for.

Really though, it's foolish to have long paths. Most applications don't work properly with paths that long, and there's rarely if ever any justification for them.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Ichneumon
Offline
Last seen: 12 years 2 months ago
Joined: 2010-12-19 14:40
Yeah, well it's not like I

Yeah, well it's not like I made them by design, but there they are. Here's an example from one of my hard drives:

S:\ArecaBackups\Old Dell Laptop\1996530182\20100816_2\Documents and Settings\XXXXXX\Application Data\Macromedia\Flash Player\#SharedObjects\A4EFE4DR\europe.nokia.com\EUROPE_NOKIA_COM_3\Get_Support\Software\PC_Suite\PC_Suite_with_new_templates\flash_prev_5\pc_suite.swf

(I replaced my actual username with "XXXXXX", but the rest is verbatim.)

That's 268 characters long.

The pathname from the "Documents and Settings" folder downward was created automatically on my (previous laptop's) hard drive by the "Flash" application, and I had no control over how long and verbose the pathname was.

When it came time to decommission my old laptop, I did a total backup of it in case I later needed something from it that I had forgotten to already migrate to my new laptop. The backup program I used at that time (before discovering how badly it sucked and then switching to Toucan) was Areca, which backed up the old laptop's drive tree under the "S:\ArecaBackups\Old Dell Laptop\1996530182\20100816_2" volume set.

Thus the 268-character pathname.

At least Areca (running on Windows XP) had no problem constructing a 268-character pathname and writing a file (actually many files) with such a lengthy pathname. Now I just want Toucan to be able to migrate that set of files to a different drive without losing something.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 7 months ago
Developer
Joined: 2005-12-10 15:22
I

will have to look at this, Toucan does make the API calls so that they should be good for roughly 32 thousand characters, obviously something isn't quite working right however.

Log in or register to post comments