How to break Windows Explorer connection between HTML file and its directory?
I am totally surprised by this user-friendly feature of Windows, where I save a web page (in Firefox), resulting in an HTML file and a directory for the CSS, JS, PNG and other material, and where that file and directory are effectively glued together.
If I copy the file to another location, the directory is copied too.
If I delete the directory, the file is also deleted.
If I try to rename the directory, a warning comes up saying: If you rename this folder, the associated HTML file might not work properly. This is of course different from the association between file extensions and applications.
If I am interested in the HTML file only, there is no way to either copy just that file, or to delete just the directory. Of course I can start over and download the page with "html only", but my point is:
What is going on? How does this work? Is this Folder Redirection?
How can I make or break the association two file system objects like a file and a directory?
I tried this also with the DOS Command Prompt, Altap Salamander, and with Linux. The association seems to be a Windows Explorer feature. But I really prefer to work with the File Explorer (while in Windows).
Solution 1:
OK I just found the answer. This is a Windows 2000 feature exclusively for saving HTM(L) pages, according to this 2001 post:
JSI Tip 3841. What is the Windows 2000 Connected File feature?
It also says that it can be turned off by adding this REG DWORD registry key with value 1:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\NoFileFolderConnection
From this it follows that you can also break the connection for a particular HTML page by renaming the EXTENSION of the html page, e.g. to foo.htmlXXX. I tested this, and you will have to click OK twice: to confirm that you change the extension, and to confirm that you break the connection with the related HTML directory, which is exactly what I want. Then simply delete that directory, and change the extension back to foo.html .
Solution 2:
You can also import the "thickets" key into your registry. It will add a radio group to "Folder Options" that allows you to choose how you want to manage the files. Set it once, and no more renaming workarounds.
A copy of the key is here: http://www.sevenforums.com/general-discussion/141877-breaking-html-association.html#post1219858
It's just a text file, that you save as a .reg instead of a .txt, so you can copy/paste the code on the page without downloading it (as it says on the page).
After adding the registry Key: