Is this the correct forum? It is not so much a question of VBA as in Windows criticism of file names
RunTime Error RTE 52 Bad FileName
This puzzles me. I suspect that the problem is the question-mark symbols in the file name.
I have loaded a string array of filenames from my hard drive and am now processing those names.
The file in question is an HTML file; Geoff sent me an email and I saved the email to disc, as I do every day.
Windows7 saved the file to my hard drive in 20th January this year.
Windows7 used the strings of characters from FireFox browser (File, saveAs) to create the file.
Win7 didn’t object to the question-marks then.
Why should it care now?
I can fix the file name – that’s not a problem.
I can’t understand how Win7 lets this slip through at the time of Saving, only to opbject months later at the time of use.
I imagine too that Win7 has been seeing the filename in all sorts of situations over the past six months – backing up, defragmenting, building an Index and so on.
Thanks
Chris
Bad Filenames
-
- PlutoniumLounger
- Posts: 14629
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Bad Filenames
You do not have the required permissions to view the files attached to this post.
Last edited by ChrisGreaves on 24 Jul 2018, 15:08, edited 1 time in total.
Fish fly in the sea, Birds swim in the air.
-
- Administrator
- Posts: 76649
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Bad Filenames (correct forum?)
It's weird that Windows allowed saving the file with a ? in the filename in the first place - if you try to do so manually, you get a popup:
Apparently it slipped through, but as you have found, it causes problems.
Apparently it slipped through, but as you have found, it causes problems.
You do not have the required permissions to view the files attached to this post.
Regards,
Hans
Hans
-
- PlutoniumLounger
- Posts: 14629
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Bad Filenames (correct forum?)
Thanks Hans, for the confirmation.HansV wrote:Apparently it slipped through, but as you have found, it causes problems.
This is not a big problem for me locally.
I wonder (heh heh!) if anyone who is running the Latest Windows cares to try it:-
Send yourself and emaIL with question marks (or other illegal characters) in the Subject field, then save that Email from a browser in full web format.
Just curious right now.
Chris
Fish fly in the sea, Birds swim in the air.
-
- Administrator
- Posts: 76649
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Bad Filenames (correct forum?)
When I do so from IE11 on Windows 10, the question mark is automatically omitted from the file name. If I add the ? manually, the file doesn't save.
Regards,
Hans
Hans
-
- PlutoniumLounger
- Posts: 14629
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Bad Filenames (correct forum?)
OK. Thanks Hans.HansV wrote:When I do so from IE11 on Windows 10, the question mark is automatically omitted from the file name. If I add the ? manually, the file doesn't save.
My guess then is that this was some sort of flaw in Win7 that has been fixed now.
Cheers
Chris
Fish fly in the sea, Birds swim in the air.
-
- PlatinumLounger
- Posts: 5280
- Joined: 24 Jan 2010, 08:33
- Location: A cathedral city in England
Re: Bad Filenames
Perhaps Windows is taking a moral stance on the matter, and rejects your luke-warm Happy Christmas message?
John Gray
The Stone Age didn't end because we ran out of stones.
The Stone Age didn't end because we ran out of stones.