How can the windows file system know that files and folders are related? [duplicate]

Posted on

QUESTION :

Yesterday, when saving a web page for analysis, I noticed a peculiar thing:
If I decided to save a “complete web page” (I was Chrome), and then deciding that I want to delete the folder with the related files to just be stuck with the html, the html file was also deleted, even though it was not in the folder; just a mere sibling.

This obviously required some meta data for Windows to do: somehow Windows knew that the folder was linked with the file, and decided to delete the file if the folder was also deleted.

I am not sure what the user story was for implementing such a feature was, since it just seems retarded to me, but how does Windows accomplish this?

ANSWER :

Windows Explorer performs a simple check: if there’s a folder called {something}_files, it looks for a file {something}.html and assumes those two are associated.

It’s rather unlikely that someone will create a pair like that by accident, so it’s quite safe assumption. Chrome mimics IE’s naming when saving webpages, that’s why it works.

Leave a Reply

Your email address will not be published.