Determine recursively both COUNT and SUM of all extensions in a folder
问题 I would like to be able to select a remote folder and scan it recursively for all file extensions. For each extension discovered, I would need a total count and well as the sum for individual file types. I've found a script here that works for a single file extension using the -include switch, but rather than running the script scores of times, it would be nice to simply run once and collect all extensions. $hostname=hostname $directory = "D:\foo" $FolderItems = Get-ChildItem $directory