Windows folder size far bigger than all files and folders within combined
One of the computers on our network ran out of harddisk space, and it turned out the size of the Windows folder is given as nearly 70Gb (when going to my computer, then the c drive) and then right clicking and selecting properties of the windows folder. However, when selecting all files and folders within that folder and right clicking and selecting properties the total size is only about 4Gb. Hidden files and folders are shown and selected while doing this. All folders are set to show hidden files and folders. Thinking the file system is borked, I did do a file system check on a restart, but the file system was found to be fine. At first offline folders where set to be used, but I did disable that and restart. What can the cause be and how do I fix this?
Thanks,
Ernst
Solution 1:
The cause is hardlinks, or more properly: using a tool which doesn't understand hardlinks to count the folder size.
Hardlinks are a mechanism by which a single file may have more than one name. A very common example is the WinSxS folder. This contains a large list of DLL names. All of those DLLs have other names as well, in other folders. Many of those other names are in the System32 directory. As a result, any naive tool will count them at least twice when trying to figure out the size of \Windows\
.
"Rightclinking" suggests that you used Explorer, which indeed doesn't know about hardlinks.