Why does Windows magically "couple" some files like this?

7,465

Why does it do this in the first place?

Because Windows Explorer (specifically) is set up to associate any items with an .htm or .html extension with any folder with a _file or _files extension, assuming that they have the same basic file name (e.g. example.htm and example_file).

Notes

  • Items are related by file name only. Alterations to the names (e.g. removing _file or _files after the folder name) will stop Explorer from treating them as a pair.

  • I am unaware of any easy way to adjust this association, such as via a Windows Explorer setting or toggle.

  • Operations run from the command line shouldn't run into this association issue.

Share:
7,465
Admin
Author by

Admin

Updated on January 05, 2023

Comments

  • Admin
    Admin over 1 year

    I saved a webpage in my browser as HTML. It saved not only a HTML file, but also a directory with various image files and whatnot.

    So I deleted the dir, since I only wanted the HTML file.

    Windows deleted the HTML file anyway.

    I assumed that I had both selected, so I restored them from the trash can and very specifically selected only the HTML file. Delete. Both deleted.

    I restored them once again and tried to move the dir to the trash can. The HTML file was deleted again.

    Somehow, Windows (10) has "coupled" these internally somehow, refusing to let me move or delete them individually. Extremely annoying.

    I ended up deleting them and then restoring only the HTML file from the trash can. It didn't restore the dir in that situation, at least. But that's a ridiculous thing to have to do.

    Why does it do this in the first place? I didn't know it could do this at all.

  • Admin
    Admin almost 2 years
    There is an option in "Folder Settings" to disable this association. (Or at least used to be; the corresponding registry key would still work in any case.)
  • Admin
    Admin almost 2 years
    I am unaware of any easy way to adjust this association - check superuser.com/a/103773/519577