Why does Windows let me save a file (Little Ships return to Ramsgate)
with a path three miles long then not let me do anything with it?
I spent a day de-bugging my file manager before twigging the problem :-(
Why does Windows let me save a file (Little Ships return to Ramsgate)
with a path three miles long then not let me do anything with it?
I spent a day de-bugging my file manager before twigging the problem :-(
Why does Windows let me save a file (Little Ships return to Ramsgate)
with a path three miles long then not let me do anything with it?
I spent a day de-bugging my file manager before twigging the problem :-(
On 05/06/2025 08:49, Jeff Gaines wrote:
Why does Windows let me save a file (Little Ships return to Ramsgate)
with a path three miles long then not let me do anything with it?
I spent a day de-bugging my file manager before twigging the problem :-(
On secrurity grounds some unix variants do not like file names which
include spaces
1. Windows is not a Unix variant
2. Ive not come across any unix or linux falavour that does not allow
spaces in filenames
1. Windows is not a Unix variant
2. Ive not come across any unix or linux falavour that does not allow
spaces in filenames
OK
On 6/5/25 12:59, Abandoned Trolley wrote:
1. Windows is not a Unix variant
2. Ive not come across any unix or linux falavour that does not
allow spaces in filenames
OK
I don't think he is contradicting you. Linux allows it, but we all
know spaces in filenames are really annoying. So people advise
against it.
On 6/5/25 12:59, Abandoned Trolley wrote:
1. Windows is not a Unix variant
2. Ive not come across any unix or linux falavour that does not allow
spaces in filenames
OK
I don't think he is contradicting you. Linux allows it, but we all know spaces in filenames are really annoying. So people advise against it.
On Thu, 5 Jun 2025 13:21:59 +0100
Pancho <Pancho.Jones@protonmail.com> wrote:
On 6/5/25 12:59, Abandoned Trolley wrote:
1. Windows is not a Unix variant
2. Ive not come across any unix or linux falavour that does not
allow spaces in filenames
OK
I don't think he is contradicting you. Linux allows it, but we all
know spaces in filenames are really annoying. So people advise
against it.
It depends on whether you use a command line frequently. Both Windows
and *nix require filenames with spaces to be quoted in a command, and
that gets tedious after a while.
Pancho <Pancho.Jones@protonmail.com> wrote:
On 6/5/25 12:59, Abandoned Trolley wrote:
1. Windows is not a Unix variant
2. Ive not come across any unix or linux falavour that does not allow
spaces in filenames
OK
I don't think he is contradicting you. Linux allows it, but we all know
spaces in filenames are really annoying. So people advise against it.
But not on "security grounds"?
It's just sloppy programming that some applications can't handle spaces.
Why does Windows let me save a file (Little Ships return to Ramsgate) with a path three miles long then not let me do anything with it?
I spent a day de-bugging my file manager before twigging the problem :-(
On 05/06/2025 13:48, Joe wrote:
On Thu, 5 Jun 2025 13:21:59 +0100So don't use the command line
Pancho <Pancho.Jones@protonmail.com> wrote:
On 6/5/25 12:59, Abandoned Trolley wrote:
1. Windows is not a Unix variant
2. Ive not come across any unix or linux falavour that does not
allow spaces in filenames
OK
I don't think he is contradicting you. Linux allows it, but we all
know spaces in filenames are really annoying. So people advise
against it.
It depends on whether you use a command line frequently. Both Windows
and *nix require filenames with spaces to be quoted in a command, and
that gets tedious after a while.
Pancho <Pancho.Jones@protonmail.com> wrote:
On 6/5/25 12:59, Abandoned Trolley wrote:
1. Windows is not a Unix variant
2. Ive not come across any unix or linux falavour that does not allow
spaces in filenames
OK
I don't think he is contradicting you. Linux allows it, but we all know
spaces in filenames are really annoying. So people advise against it.
But not on "security grounds"?
It's just sloppy programming that some applications can't handle spaces.
On Thu, 6/5/2025 3:49 AM, Jeff Gaines wrote:
Why does Windows let me save a file (Little Ships return to Ramsgate) with a path three miles long then not let me do anything with it?
I spent a day de-bugging my file manager before twigging the problem :-(
On an OS like Windows 7, the bug was likely left there.
File Explorer cannot delete a MAX_PATH file. There is one precise path length that causes a problem, and then File Explorer cannot move it or delete it. You could write a short PERL script, and if it handled the file, it
could delete it.
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
"the maximum path on drive D is "D:\some 256-character path string<NUL>"
On maybe a W10/W11, that was fixed. That specific path length no longer presented
a challenge to File Explorer. It could handle 260 character paths.
And speaking in broad general terms, files which violate the rules for filename,
extension, or path, they generally come from browsers. Even if the browser presents
a file saving dialog, that might not be sufficient to guarantee that some trick is
not played.
https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file
"Do not end a file or directory name with a space or a period.
Although the underlying file system may support such names,
the Windows shell and user interface does not."
You would expect a browser to ignore such entreaties.
*******
There is a feature called LongPathsEnabled (max ~32767?).
Office does not support LongPath. File Explorer does not support LongPath. The OS can have LongPath enabled. Applications can be LongPathAware.
It is apparently possible to craft exploits that are more likely to be attempted when LongPaths are present.
The long and the short of that feature, is don't use it. In certain
scanning scenarios, it can radically slow down the scan (junctions perhaps).
The default on a clean install, is for that to be disabled (gives 260).
The feature may have "existed" in the filesystem for a number of years, without any LongPathAware capability having been developed. The support
at some point in Win10, is mere wallpaper, with the feature not really
being supported in a practical way. I gather no one wants to change
all the string definitions to handle paths that big :-) The behavior on Junctions would be egregiously bad. "Pitch the PC out the window" bad.
Bill Gates once said "640,000 characters is enough for anyone", and he
was right. That's why War and Peace stopped at 640,000 characters :-)
Some of the other things Bill Gates said, such as utterances about
MAX_PATH, were likely only said to the bathroom mirror. "If only
we could make paths that were ridiculously long."
The number of spaces is lost, unless I can access a copy of the shell string for analysis. Since "cd" is a built-in, in Command Prompt, the developer
has different opportunities than the lameutil.exe does. Thus, for my utility, only quoting supports my intent. The "cd" built-in developer can just chomp the string
and absorb "this is a disaster" as the intent.
It all works, arcane rules and all.
Fredxx <fredxx@spam.invalid> wrote:
I suppose the issue is where you have a Trojan called "The.exe" that can
be run inadvertently.
That's not a space in filenames issue, though.
On 6/5/25 12:59, Abandoned Trolley wrote:
1. Windows is not a Unix variant
2. Ive not come across any unix or linux falavour that does not allow
spaces in filenames
OK
I don't think he is contradicting you. Linux allows it, but we all know spaces in filenames are really annoying. So people advise against it.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 498 |
Nodes: | 16 (3 / 13) |
Uptime: | 61:17:55 |
Calls: | 9,813 |
Calls today: | 1 |
Files: | 13,754 |
Messages: | 6,191,184 |