I'm trying to get the sizes of a few file types in a particular folder (My Documents). So far I've been successful in obtaining the My Documents size, and even wrote a script to parse the results of all of our computers on the network and get the average/total for the whole company.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H5&) // <--My Documents namespace is &H5&
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path
Set objFolder = objFSO.GetFolder(strPath)
MyDocSiz = (objFolder.Size / 1000000)
MyDocSiz = Round(MyDocSiz, 0)
The only way to get this through the UI that I know of is to do a search, select all of the results, and right click and hit properties. I think that this is embedded somewhere in the shell because when you do this, it says "All files of type PST". But it may not be. Help.
The file types I'm trying to get right now, not that it really matters, are PST, OST, GHO, GHS, VMDK, BKF, ISO, MP3.