Explorer still limited by MAX_PATH

August 23, 2009 at 1:41 AMJoshua Harley

With the upcoming release of Windows 7 by Microsoft I am still surprised at a limitation of Explorer that has been around since explorer was first introduced with Windows 95. When Microsoft first introduced Windows 95 they included long filename support. This long filename support allowed Windows to store a filename of “up to 255 characters” while still maintaining compatibility with DOS and previous versions of Windows.

Remember filenames like LETTER~1.DOC and directories like PROGRA~1? Well, believe it or not they still exist by default in Windows 7! You can confirm this yourself by opening a command prompt and running the dir /x command. This will display files in the current directory with both their long filenames and DOS compatible filenames. Of course you can turn this filename generation off by setting the appropriate registry keys.

Back with Windows 95 the Windows API generally provided only ANSI functions. ANSI strings were either single-byte or a variable-width multi-byte arrays. When Windows NT came along with its new kernel, all of the internal strings were represented in Unicode (double-width) character arrays.

The string "HELLO" in ANSI:
Byte: 1 2 3 4 5 6
Data: H E L L O \0
The string "HELLO" in Unicode:
Byte: 1 2 3 4 5 6 7 8 9 10 11 12
Data: H \0 E \0 L \0 L \0 O \0 \0 \0

Along with the Unicode kernel, Windows NT also included updated APIs that used the new Unicode strings. So for every CreateFileA you now had a CreateFileW. To maintain backwards compatibility the original CreateFileA still had the limitation on the length of the path that Windows 95 did. Otherwise known by the macro of MAX_PATH which is defined as 260. Since CreateFileW was a new function, there was no backwards compatibility to maintain, so Microsoft provided a way to provide a path up to 32,676 characters. You can read more about the maximum path length on MSDN.

The drawback of still providing both APIs is that as applications pick and choose they can run into issues with the length of the path. Microsoft Word uses the CreateFileW function which allows them to create longer filenames than explorer can handle. I was hoping that in Windows 7 Explorer would finally be updated to use the Unicode CreateFile function… since Windows 95 was released over 14 years ago.

Unfortunately I ran into Explorer’s 260 character limitation just the other day. One of the deleted files resulted in a path of 273 characters long and the following dialog popped up:

The folder contains items whose names are too long for the Recycle Bin.

Comments (2) -

What is even more incredible is that they still didn't fix shell path handling functions such as PathFindExtension, they are still limited to MAX_PATH (256) characters, so I have to write my own if I want my code to be 21 century-compatible.

I'll skip Win7 and stick with XP because nothing changes.

ken masters
ken masters says:


It is perfect time to make some plans for the future and it is time to be happy. I have read this post and if I could I want to suggest you some interesting things or suggestions. Maybe you can write next articles referring to this article. I wish to read more things about it!

Heya i'm for the first time here. I found this board and I find It truly useful & it helped me out a lot. I hope to give something back and help others like you aided me.

We have 20+ years’ experience in the IT industry especially eCommerce. We believe in building long-term relationships and making certain that our clients succeed in all their goals because their success is our success.

When it comes to business you want ot be sure that you've got all your bases covered. More importantly it seems like you've covered the basics in this post.

Our experienced Professionals hold industry certifications and have successfully repaired thousands of computers for end users, businesses and resellers.

Its like you read my mind! You seem to know a lot about this, like you wrote the book in it or something. I think that you can do with some pics to drive the message home a little bit, but other than that, this is wonderful blog. An excellent read. I'll certainly be back.

I just could not depart your website before suggesting that I actually enjoyed the standard info a person provide for your visitors? Is going to be back often to check up on new posts

You have brought up a very  wonderful  details ,  regards  for the post.

I always was concerned in this subject and still am, thank you for putting up.

Excellent blog here! Also your website loads up fast! What web host are you using? Can I get your affiliate link to your host? I wish my site loaded up as quickly as yours lol

Definitely, what a fantastic site and enlightening posts, I will bookmark your website.Best Regards!

I surely like your blog and will look into your next posts.<br />Thanks for the info

Hello there! Wonderful post! I'm a usual website visitor (much like addict ) of the website nevertheless I had a difficulty. I am just not at all absoluterly certain if its the right site to ask, but you've got no spam comments. I receive comments all the time. Are you going to you help me? Thank you!

Do you have a spam problem on this blog; I also am a blogger, and I was curious about your situation; we have developed some nice procedures and we are looking to swap strategies with other folks, why not shoot me an e-mail if interested.

assisted me a lot i love this website recommended for many people thank you

thank you for share this article just what i was looking for everyone loves this you made some clear points there

totally what i wanted to find so much excellent regards for helping out wonderful post

sweet website im thankful for the post cool here is a superb weblog

information seems overwhelming sites of interest recommended for many people valuable information

top post its very nice to read muchos gracias for your blog totally what i wanted to find

very neat post much thanks stick with it everyone loves this this really answered my problem

excited with your article truly amazing very interesting details i liked it

how can i find out more? absolutely written subject material thanks again i’m dealing with many of these issues as well

I'm sorry, but I was eating crackers while reading your comment and I almost choked on one whilst snorting with laughter. I know what you're talking about (ya know goose egg city), it happened to me a lot when I would play tag, I would run looking back at my chaser instead of looking forward like I should have been. And then you look for one second, and BAM you smack your forehead on the slide's steel ladder and you knock out for a second, stars and cookies in your eyes!

I love your blog.. very nice colors & theme. Did you make this website yourself or did you hire someone to do it for you? Plz respond as I'm looking to create my own blog and would like to find out where u got this from. thank you

I desired to thank you very a lot for this describing write-up. I've already book marked your site, when I have a lot more totally free time I am going to need to perform some deeper learn.

I believe you have remarked some very interesting details , regards for the post.

Established a savings account especially for your crisis fund or maybe angry cash fund. Whatever you desire to it is known as, simply create one!

I truly appreciate this post. I have been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! Thank you again

It's really a cool and helpful piece of information. I am glad that you shared this useful info with us. Please keep us informed like this. Thanks for sharing.

WONDERFUL Post.thanks for share..more wait .. ...

Fantastic site. A lot of useful info here. I'm sending it to several friends ans also sharing in delicious. And certainly, thanks for your sweat!

There is noticeably a bundle to know about this. I assume you made certain nice points in features also.

<p>Alle Zune-Ger盲te Werkzeuge werden aus 眉berm盲脽iger Qualit盲t, hergestellt. Das Audio-System, Kopf-Telefone, acadmic wiriting in 72 Stunden Kabelpaket, USB-Ladeger盲te, Preis-Pack, Adapter und viele zus盲tzliche sind ganz hervorragend mit gutem Design und Kompatibilit盲t. Personen tats盲chlich f眉hlen sich gl眉cklich, wenn sie bekommen eine gute Ausr眉stung auf dem Markt. Mit Websites, die alle Form von Werkzeugen von uns w盲hlen die Werkzeuge meist vor allem auf ihren Geschmack und ihre Anforderungen. Viele Unternehmen sind auf hohe Produktverk盲ufe mit ihrer Ausr眉stung den Anforderungen von Menschen. Alles geht richtig mit den Erzeugern zu kaufen, wenn die Aussichten immer wieder alle Produkte, die in einer Woche auf dem Markt mit wunderbaren M枚glichkeiten und Designs gestartet wissenschaftlichen Schreiben sind.</p>

<p>very much appreciated.|</p>

<p>Appreciating the dedication you put into your website and detailed information you offer. It’s nice to come across a blog every once in a while that isn’t the same outdated rehashed material. Excellent read! I’ve saved your site and I’m including your RSS feeds to my Google account.</p>

<p>Hello! I could have sworn I’ve</p>

<p>My spouse and i got really fortunate that Chris could carry out his investigations via the precious recommendations he acquired through your weblog. It is now and again perplexing just to always be giving away tips and tricks which some other people might have been selling. We really already know we have the blog owner to thank for that. The most important illustrations you have made, the easy site menu, the relationships your site help to engender – it’s all astonishing, and it’s really letting our son in addition to the family reason why that concept is awesome, and that’s truly indispensable. Thanks for everything!</p>

<p>Nice blog here! Also your web site loads up very fast! What web host are you using? Can I get your affiliate link to your host? I wish my site loaded up as quickly as yours lol</p>

Do you mind if I quote a few of your posts as long as I provide credit and sources back to your webpage? My blog is in the exact same niche as yours and my visitors would really benefit from some of the information you present here. Please let me know if this okay with you. Thank you!

I am really impressed with your writing abilities as neatly as with the structure on your weblog. Is this a paid theme or did you modify it yourself? Either way stay up the nice high quality writing, it is uncommon to peer a nice weblog like this one today..

Thank you for sharing excellent information. Your web site is so cool. I'm impressed by the info that you've on this website. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for more articles.

After study a few of the blog posts on your website now, and I truly like your way of blogging. I bookmarked it to my bookmark website list and will be checking back soon. Pls check out my web site as well and let me know what you think.

Wow! I cant think I have found your weblog. Extremely useful info.

Thanks for your short article. I would love to say that the health insurance broker also works well with the benefit of the actual coordinators of your group insurance coverage. The health broker is given a list of benefits needed by somebody or a group coordinator. What a broker does is look for individuals or even coordinators which often best go with those needs. Then he offers his suggestions and if all sides agree, the actual broker formulates a legal contract between the 2 parties.

I have learned new things from the blog post. One more thing to I have seen is that in many instances, FSBO sellers will certainly reject you. Remember, they might prefer to never use your companies. But if an individual maintain a gradual, professional partnership, offering assistance and remaining in contact for around four to five weeks, you will usually be able to win an interview. From there, a listing follows. Thank you

I have been searching for information on this topic for awhile now. So, really appreciate you taking the time to write about it. Truly was difficult to find, so I wanted to post my first comment out of gratitude

Hey there! Do you know if they make any plugins to protect against hackers? I'm kinda paranoid about losing everything I've worked hard on. Any suggestions?

Baksheesh 3: Do not put to use too much surfactant

We're a group of volunteers and starting a new scheme in our community. Your web site provided us with valuable info to work on. You've done an impressive job and our whole community will be grateful to you.

Does anyone remember that suspended-ring contraption that you grabbed onto, ran, and pulled your legs up to send you flying in a circle? There was a pole with a metal cap that rotated and had chains radiating down from it that led to a large circular metal bar (Imagine a big umbrella without the canvas). When there was an imbalance of kids, those on the light side would be tilted high up (I remember actually going into tree branches one time). My friend lost his grip and flew off into a fence  he needed several stitches  but they kept the thing up (it may still be there). I cannot believe this thing was ever deemed acceptable! Does anyone know what it was called?

Can't leave this site without posting my thank you comment. Very valuable info, thank you.

I and also my friends ended up studying the great secrets and techniques found on your site while all of a sudden I got a horrible suspicion I never thanked the blog owner for those secrets. My women had been totally warmed to read through them and have in effect honestly been tapping into these things. We appreciate you genuinely very accommodating as well as for considering certain beneficial resources most people are really needing to be informed on. Our own sincere regret for not saying thanks to you earlier.

eventhough Danny De Vito is short, he is also one of the best known actors in Hollywood~

Hurrah, that's what I was seeking for, what a material! existing here at this blog, thanks admin of this site.

My spouse and i were now fortunate that John managed to do his inquiry through the entire precious recommendations he came across from your web pages. It's not at all simplistic to just possibly be offering tips which usually other people have been trying to sell. And we all do understand we've got the website owner to thank for this. The entire explanations you've made, the straightforward blog navigation, the relationships you can make it easier to foster  it's most exceptional, and it's facilitating our son in addition to our family understand the topic is cool, and that is wonderfully mandatory. Many thanks for all!

Heya! Nice piece of writing! Now i'm a ordinary visitor to your site (far like addict ) of the website though I had a is sue. I'm so not actually positive whether it is the right place to question, but there are no spam comments. I get comments just about every day. Will you assist me? Thanks for the tips!

My grandfather showed me a toy of his once... was and old putt putt (pop pop) boat.All I could think of is.. "Why didn't *I* get to play with that kind of toy when I was younger? So cool!"The putt putt boat (see link) is a toy where you actually have to pour vegetable oil in it and LIGHT IT ON FIRE! Yes, grandpa confirmed, he was allowed to light it himself and would use it mostly unsupervised (he said father would be "around" but wouldn't be directly supervising him). His dad taught him responsibility... after teaching him how to work the toy and giving him some general rules he let him play. I remember that he was only allowed so many matches (they where the long wooden ones) and had to bring them all back even if spent... but that's the only "protective" measure that was taken.

I'd see all kinds of ads about blogging on the Internet to earn money, but don't know of anybody that has actually made any money this way. I'd love to hear from anybody who has..

Pretty great post. I simply stumbled upon your blog and wished to mention that I have really enjoyed surfing around your blog posts. In any case I will be subscribing in your feed and I am hoping you write again soon!

What i do not realize is in truth how you are no longer actually a lot more smartly-liked than you might be now. You are so intelligent. You realize thus significantly when it comes to this matter, produced me personally believe it from numerous various angles. Its like men and women aren't fascinated until it is something to do with Lady gaga! Your individual stuffs outstanding. At all times handle it up!

Excellent share it is surely. Friend on mine has been waiting for this information.

fantastic publish, very informative. I'm wondering why the opposite specialists of this sector don't understand this. You must proceed your writing. I am sure, you've a great readers' base already!

Took me time to study all the feedback, but I seriously appreciated the submit. It proved to turn out to be Fairly important to me and I?m positive to all the commenters right right here It?s continually fantastic whenever you can not just be informed, but additionally entertained I?m positive you had enjoyable writing this submit.

I'm sorry, but I was eating crackers while reading your comment and I almost choked on one whilst snorting with laughter. I know what you're talking about (ya know goose egg city), it happened to me a lot when I would play tag, I would run looking back at my chaser instead of looking forward like I should have been. And then you look for one second, and BAM you smack your forehead on the slide's steel ladder and you knock out for a second, stars and cookies in your eyes!

We are a newly setup call center in India and would like to know how does one go about getting clients in the US  we are also planning to send one of our reps to the US  any suggestions would be greatly appreciated

I am only writing to make you understand of the terrific encounter my wife's princess experienced browsing yuor web blog. She came to find a good number of pieces, which include how it is like to have a very effective helping style to have folks very easily grasp certain complex subject matter. You actually surpassed my expected results. I appreciate you for presenting the interesting, trusted, informative as well as cool thoughts on your topic to Gloria.

Here are my personal strategies for everything. First eat once a day, or work towards one high nutritious diet and meal plan. Meditate daily, this will help preserve the telemores.

magnificent post, very informative. I wonder why the other specialists of this sector do not notice this. You must continue your writing. I am confident, you've a huge readers' base already!

I am really impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you customize it yourself? Anyway keep up the nice quality writing, it is rare to see a nice blog like this one today..

I was hoping that once it hit zero that this thread would just self implode but I guess that's just wisful thinking. Maybe next time.

This is the kinda post I was searching for. Sometimes I can't find what I'm looking for from Bing but it seems this time it worked for me! Thanks for your help.

Add comment