In my case, the local folder it occurred with is c:\temp\working – I
certainly hope that isn’t long enough but with MS it wouldn’t surprise me
True, but the MAX_PATH includes the name of the file as well. It’s been
a long time since I used anything like MAX_PATH in C programming (on
Windows anyway) so I’m not sure if it’s still 255 bytes.
I’d be surprised (maybe!) if it was still this short.
I know that you can get longer paths by using the
“\server\share_or_directory\path\file.ext” format, but surely a plain
old file name should be able to be longer than 255?
Insert delay while I JFGI…
Hmm. This link seems to imply that MAX_PATH has indeed been increased,
http://support.microsoft.com/kb/942960, but only to 259 bytes. Sigh.
Another entry shows that NT4 and Win2K allow only 255 and also, mentions
that all WIN32 paths are limited to 255 (or 259??) bytes.
Ahem, for crying out loud!
So, anyway, getting back to your point, “C:\Temp\Working” is only 15
characters (including the drive), so there should be plenty scope for
long file names before you hit the limit!
Ok, fires up Windows XP in VirtualBox, starts Wx-Dev++ and creates a DOS
application to show the size of MAX_PATH. It is, on 32 b it XP, 260
characters, so that allows a file name to be a maximum of 259
And a few minutes later, when I remember how to convert an int to a
wxString, I have the same result for Windows GUI applications.