On Windows, creating file filename.htm sometimes create an associated folder filename.files at the same time if needed. If we delete filename.htm, the associated folder is deleted at the same time.
According to this, it is a behavior of Windows Explorer. It is called 'Connected Files'. This discuss SHFileOperation.
Can I mimic the behavior by Python? Python os.remove()
or win32api.DeleteFile()
won't do the same thing.
I am worried that brutally deleting both the file and folder confuses Windows Explorer. Or leave some something trashy in the registry?