So I've started working on a problem where I need to know how many files are in a subfolder of a certain name, that is repeated multiple times in throughout the directory. All folders I want to count have the same name. For example:
Main Folder
Subfolder
Folder I want to count
Folder A
Folder B
Subfolder
Folder I want to count
Folder C
Folder D
I'm able to count the number of files in all subfolders recursively, but I don't know how to only look at folders named " Folder I want to count ".
This is where I've gotten so far to count everything. What do I need to add/modify to only look at and count in the area I want. I'm not familiar with supershell, and have been working to make sense of various questions and cobble this together.
Get-ChildItem -recurse | Where {!$_.PSIsContainer} | Group Directory | Format-Table Name, Count -autosize