homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Destination path too long
I think I maxed something out

 2:58 pm on Jun 12, 2012 (gmt 0)

I rearranged the pages on my website and added new pages to the ones that are there now.

I was happily tra la la ing along, creating file names that I like, and then when I got a certain percentage of the way finished I decided to make a backup of what I'd done so far.

So I went to the folder containing the website, copied the folder, and began pasting it in another location. But soon after the pasting process began, it stopped and I got an error message that read

"Destination path too long.

The file name(s) would be too long for the destination folder. You can shorten the file name and try again or try a location that has a shorter path."

Does anyone know what this means?

I can shorten some of the file names or file paths if necessary to make a backup, but my BIG question is if I leave my "New and improved" website the way it is, will it be a problem when I upload it to the server? Or in other words, if I upload the "New and improved" version of the site to the server with no changes in file names or file paths, will visitors be able to view all of the pages?




 3:33 pm on Jun 12, 2012 (gmt 0)

Windows has a file path length limitation of 256 characters. For example:

Length = 23


 5:02 pm on Jun 12, 2012 (gmt 0)

This is why some CMS systems use tiny URLs or an MD5 conversion internally but long SEO friendly paths externally. Meaning your file name on the server is always about 10 characters long but it can be a hundred characters long in the URL presented to the visitor. Assuming you're using an Apache web server you would use a simple RewriteMap to translate from the external URL to the internal path.


 5:18 pm on Jun 12, 2012 (gmt 0)

Windows has a file path length limitation of 256 characters.

This frequently catches me out when moving things from either my linux desktops ( which are connected to the web ) or live linux servers onto USB keys and then onto my windows "dev" machines..which are not connected to the web ( other than for vital updates to software that they are running..or their OS ) ..windows restrictions of "path length" makes for some less than optimal organisation on drives..long stuff has to be on disc root..

What is really "fun" is when it has nearly finished "guesstimate" / "lie" thing that held over from Vista, about how long it all will take ) and then it digs its heels in and says some path is too long..

Not holding my breath in anticipation of them doing anything about this though..

Not to mention the characters that windows file systems won't do ( and can't copy / accept ) like pipe symbols in URLs etc..


 10:46 pm on Jun 12, 2012 (gmt 0)

Tangential answer: If the complete name, including domain and path, is over 256 characters, it won't physically fit in your average browser's address bar-- and it will make mincemeat of anything in tabs, which max out at 10-12 characters if you've got a lot of them.

So this is a good opportunity to rethink your whole directory structure. Save the complicated stuff for behind-the-scenes query strings.

:: detour here to make sure I'm not in "do as I say, not as I do" territory: nope, don't seem to have anything deeper than 2 directories ::


 3:48 pm on Jun 13, 2012 (gmt 0)

To clarify, this is not within a browser, it's within a system's GUI for copying files from one location to another.

I get this all the time when moving files around on Windows. A too-deep directory structure can cause it too. What I don't like about it is it doesn't specify **which** files/directories are too long.

We're all spoiled. Who remembers the 8/3 rule? :-) Pre Windows 95, you could only name files with names 8 characters long and a three character extension.


 7:19 pm on Jun 13, 2012 (gmt 0)

Yes, I understood that it's on the hard drive now. But unless the part of your hard drive devoted to web pages is buried eight directories deep-- 256 characters is a ### of a lot of directories unless you've given them all six-word names-- there may well be trouble ahead anyway.

Hm, yes, I do remember situations where we had to constrain our filenames to 8+3 --complete with truncated extensions like .jpg or .htm --for the sake of the poor saps using That Other Operating System ::snrk::


 8:21 pm on Jun 13, 2012 (gmt 0)

Windows still does store filenames in 8:3 format!

Drop into DOS and type "dir /-n" and it will show them. It used to store in 8:3 format and the long filename was in a system hidden file. It might be the other way around in newer filesystems but it still stores them somewhere!

If the 'destination path' is too long with long filenames, it might be a 256 character limit on the short filenames, so renaming them won't necessarily work as they may still be 8:3 - i.e. the same length!

Limits vary on Operating Systems so what may be fine on Windows is not fine on Linux (e.g. one is case sensitive, one isn't). It can also vary on filesystems.

If this is a backup you are doing to an external hard drive, many of them are formatted in FAT32 format. This format is old but works with most systems straight out of the box so it is commonly done for convenience. Reformatting it to NTFS or other filesystem may help. For example, FAT32 cannot store files larger than 4GB but NTFS can, so if there are large files the hard drive will fail to store the file from the factory but a simple reformat will solve it.

Your website on the other hand, some recent versions of Internet Exploder doesn't like links longer than 255 characters, including the http:// and parameters. You might need to consider this.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved