
Why are hidden files with a leading tilde treated as super-hidden? - abhinickz
https://blogs.msdn.microsoft.com/oldnewthing/20170526-00/?p=96235
======
andrey_utkin
Violation of orthogonality of design.
[http://www.catb.org/esr/writings/taoup/html/ch04s02.html#ort...](http://www.catb.org/esr/writings/taoup/html/ch04s02.html#orthogonality)

~~~
astrobe_
Doesn't apply here: it's not a designed system, it's a pile of hacks.

~~~
nebabyte
Doesn't matter; it's what shipped, and so is a system in spite of its quality
or lack thereof.

There's no problem pointing out a non-computer as not turing complete if it
was shipped and sold as a computer.

------
userbinator
_That 's why you have to disable "Hide protected operating system files" in
order to see them._

One of the settings, along with hiding the file extensions, that I _always_
disable without exception.

------
officialchicken
Legacy compatibility reasons, I presume. I know this worked to super-hide
files with NT 3.5x/4 and Win-9x or used when copying files by those OS's. And
I'm fairly certain that it existed for "temporary" files with MS-DOS 6.x and
5.x too, maybe even earlier version. Are there any MS-DOS 2.x / pre lan-
manager pros on HN who know how long this has been around?

~~~
DanBC
I have an old MSDOS 2.0 manual.

~ is listed as an acceptable character for filenames.

Here are some photos of various pages:

[http://imgur.com/a/E952T](http://imgur.com/a/E952T)

------
amluto
One might argue that the correct fix is to remove the concept of super-hidden
files entirely. For backwards compatibility, just never report that a file is
super-hidden.

Normal users don't see hidden files, so normal users are served well. Users
who want to see the complete list of files (to clean up garbage, notice crap
left behind by malware, fix problems caused by leftover malware, etc) probably
want to see files that start with ~.

Alternatively, the options could be "hide hidden files", "show hidden files
but not protected operating system files", and "show all files, even protected
operating system files", rather than having separate, confusing controls.

------
drinchev
Okay, so who decided on that? Is it a PM or a developer? What's their reasons
and why didn't they document it?

Do I have other "invisible" files around that I can't see?

~~~
ma2rten
This particular behavior sounds more like a bug than an explicit design
decision.

 _Do I have other "invisible" files around that I can't see?_

Most system files in Windows are hidden. I think it's an effort to prevent
users from deleting some important system file, either accidentally or because
they read on some website that it's a virus.

~~~
donarb
Or the ever popular habit of deleting large unknown files to free up space on
disk.

------
UnoriginalGuy
Backwards compatibility.

Older versions of the Office suite used ~ files as locks. New versions flag
those same files as hidden and system, so Microsoft hacked in a compatibility
fix for old versions of Office to mark all ~ files similarly automagically.

------
youdontknowtho
I love all the comments here about "how could this be?"

Repeat after me...There is no magic. There is no perfect.

This software was used by hundreds of millions, if not billions, of people.
They got work done with it. Think your favorite pile of C code is "more
correct" or "more sublime"? Maybe. By many measures of successful that doesn't
matter. And that's why those "it will be perfect this time" rewrites of
UNIX/Linux aren't in use and Unix/Linux is.

~~~
wruza
By many measures of correct, success also doesn't matter. Let's remember how
many flaws were the cause of time, money, mood loss of many people. How do you
know which is more important at the level of something like an OS?

Btw, the time when legacy support was crucial is long gone. App stores and
automatic updates will make it absolutely transparent in few decades. Windows
is probably the last OS where you download and execute random ancient chunks
from the raw internet -- nothing to be proud of.

------
bsenftner
Interesting personification of Explorer. One might think it were a person the
way it is described.

~~~
drewbug
[http://catb.org/jargon/html/anthropomorphization.html](http://catb.org/jargon/html/anthropomorphization.html)

------
dorianm
So, how do we fix it?

~~~
mintplant
> This problem was fixed in Windows 8 as a side-effect of a re-write of the
> way the shell copy engine copies files. The shell now uses the Copy­File2
> function to copy files, relying on the kernel function to do the heavy
> lifting, and using the callback function to monitor progress and possibly
> cancel the operation. The kernel function doesn't know about these
> mysterious shell item IDs. All it knows how to do is copy files, and it
> obtains the attributes directly from the source file, which as we recall is
> marked hidden but not system.

~~~
therein
Yeah, that sounds better.

------
stevebmark
How could this be in the core of an OPERATING SYSTEM? At one of the largest
software manufacturers in the world? I legitimately do not understand.

~~~
jonchang
Not to be too snarky, but tons of other operating systems have these kinds of
"features". The most prominent example is in macOS and Linux with file names
starting with a dot being hidden by default.

~~~
stevebmark
Hiding files starting with a dot is just a cosmetic, view level
implementation. This article shows that Windows had coupled this behavior
directly to system level file flags.

~~~
sratner
This is also just a cosmetic, view level implementation in Explorer (complete
with a bug, also in Explorer). In fact, the fix was to use kernel fs functions
directly.

