Scenario: Files and Folders:
/folder1 |-file |-file |-folder2 |-file |-file |-folder3 |-file /folder4 |-file |-folder5 |-file |-file |-file |-file |-folder6 |-file |-file |-file
What I now want to do is recursivly count all files in all subfoders, but in my output I just want to have the top foldernames and the file counts (of each file in the folder and all subfolder).
For this scenario it would be:
folder1;5 folder4;8
Is there a smart way to solve this with PowerShell?