FW: Saving files

I posted this last April and got a few responses that other people had seen it,
too. Some suggested going back up a level or two and trying again. That works
some of the time.

I’ve found another work-around. When I get to an “empty”
folder, I can right-click in the empty space and choose “Refresh”.
The folders and files I expect to see show up. J The font is different. No idea
why that is.

HTH,

Dan

image001.jpeg
image001.jpeg

Morning Dan,

I posted this last April and got a few responses that other
people had seen it, too. Some suggested going back up a
level or two and trying again. That works some of the time.
I'm wondering if you have somehow managed to reach a position where the
full path is exceeding the maxpath size for a filename?

Windows (2000 anyway - I'm stuck in the dark ages here) allows me to
copy a folder tree from one place to another. A few times I've had to
copy a deep tree with exceedingly long (management chosen) folder names
to a new location.

The copy works fine, but when you get down to opening a file, Windows
barfs and tells me that it can't be opened (or similar). Moving the tree
back up to the root works fine, and allows me to open the same file
happily.

Strange but true.

I've found another work-around. When I get to an "empty"
folder, I can right-click in the empty space and choose
"Refresh". The folders and files I expect to see show up. J
Hmm. Spooky. I have no suggestions for why this might work.

The font is different. No idea why that is.
Windows works in mysterious ways?

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

I’m on XP Pro. Your idea seems plausible, but I have not noticed that it
only occurs when I go deep, nor have I seen any pattern or that it happens every
time I go to a certain folder.

Dan

Daniel B Madvig
Computer Technologies

Northwestern College & Northwestern Media
3003 Snelling Ave.
St. Paul, MN 55113
www.nwc.edu

651.631.5323
image001.jpeg

I’m fairly certain that this is a bug in the open dialog component we are using.
It ultimately hosts the Windows open dialog controls, but extends it to allow us
to add the favorites dropdown, encoding, etc. The component developers are
unable to reproduce and I can’t either. Some in the office have seen it, but
unfortunately we need a reproducible test case to assist them and we don’t have
one at this time.

Michael
image001.jpeg

I'm wondering if you have somehow managed

to reach a position where the full path is exceeding

the maxpath size for a filename?

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 :wink:

Roger S.

Perhaps by way of consolation:

I’ve recently begun to use Oracle Warehouse Builder. I’ve had the
same problem there a time or two when I attempted to save something in the
Design Center. Their file saving app may be built on Windoze, but it’s
obviously different looking.

Dan

Daniel B Madvig
Computer Technologies

Northwestern College & Northwestern Media
3003 Snelling Ave.
St. Paul, MN 55113
www.nwc.edu

651.631.5323
image001.jpeg

Evening Roger,

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 :wink:
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,
Move the CSC folder to a new location - Windows Client | Microsoft Learn, 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
characters/bytes long.

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.

Sigh.

--
Cheers,
Norm. [TeamT]

only to 259 bytes

Heh, it's a good thing I can't stand long filenames then.

In other words, you can eliminate that as the cause of the issue when I experienced it.

Kinda makes me wonder if the same length is true on Win7, 64-bit.

Ah well... maybe they'll get around to fixing that when they finally correct Excel into understanding that the year 1900 is not actually a leap year.

Of course... porcines may evolve and become avians too :slight_smile:

Roger S.

This communication, including any attached documentation, is intended only for the person or entity to which it is addressed, and may contain confidential, personal and/or privileged information. Any unauthorized disclosure, copying, or taking action on the contents is strictly prohibited. If you have received this message in error, please contact us immediately so we may correct our records. Please then delete or destroy the original transmission and any subsequent reply.

Morning Roger,

Kinda makes me wonder if the same length is true on Win7, 64-bit.
I checked. According to http://support.microsoft.com/kb/177665 the 256
byte problem affects 64 bit as well. Oops!

It would be nice if they could be consistent, I know that MAX_PATH on 32
bit XP is 260 bytes (allowing 259 characters) and yet, Microsoft say
only 255 bytes is allowed.

I'm also not all that convinced that they know what they are doing (or
it could be me of course!) because

explains how the SetCurrentDirectory call works - and that allows the
cwd to be set to anything up to the size of MAX_PATH -2 (one for the C
terminator and 1 for the mandatory trailing backslash).

So, if I use the full allowed maximum size, my files will all be too
long for MAX_PATH. Duh!

Ah well, back to work!

Cheers,
Norm.

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk