It seems Windows Explorer does not include the sizes of "hidden" files when calculating the parent folder size, even when I check "Show hidden files, folders, and drives" in the "Folder and Search Options". When I hide a folder, Explorer reports it as empty when I mouse over it, even when there are files &/or folders in it. A similar issue arises with "Operating System Files and Folders", or files hidden and often inaccessible to the average user that control how Windows operates and are very dangerous to mess with.

Why does this happen? Also, is there a way for Explorer to include these files/folders when calculating the parent folder's size? Perhaps including other users' files/folders, even if you can't access them? Even for files you are not allowed to access, knowing the size of the folder seems important.

For me, this is happening in Windows 8, but I wouldn't be surprised if other Windows versions did the same thing.

I would like the solution to work right in Windows Explorer, but any solutions, including ones scripting languages, is fine.

  • You realize that PowerShell is simply the command line interface for a scripting language right? – EBGreen Apr 21 '14 at 18:35
  • I fail to see your point. You can do shell scripting with the "scripting language used by the CLI that is PowerShell", and I don't know what this scripting language is, if it even has a name. – trysis Apr 21 '14 at 18:55
  • The name is powershell. All a powershell script is is the same commands you would do at the CLI put into a text file. So when you do those commands at the CLI you are using a scripting language. So saying that you won't entertain scripting language answers seems like a silly limitation. – EBGreen Apr 21 '14 at 19:06
  • I meant I'll accept the 2 scripting languages built into Windows, just not whatever things like Python, Perl, etc. are. Sorry for the confusion. I just put I'll accept scripting languages in general so it's easier. – trysis Apr 21 '14 at 19:09
  • There are at least three scripting languages built into windows since at least windows 7. – EBGreen Apr 21 '14 at 19:12

Here is a simple solution in Powershell. You can tweak it all that you want:

(Get-ChildItem .\* -force | Select-Object -ExpandProperty Length | Measure-Object -Sum).sum
  • this script doesn't work for me. "Length" property not found. – magicandre1981 Apr 22 '14 at 4:20
  • I would rather have a solution only involving Windows Explorer, but since this is the only answer so far, I have accepted it for now. – trysis Apr 22 '14 at 13:05
  • @magicandre1981 which version of powershell? – EBGreen Apr 22 '14 at 14:46
  • I use Powershell version which is part of Windows 8(.0). – magicandre1981 Apr 22 '14 at 17:18
  • Woops. had a typo. corrected now – EBGreen Apr 22 '14 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.