You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ps has a measure-object.count method which is what my current script uses as it iterates through the tree.
ForEach ($currentFolder in $FoldersArray) {
#display the current path being evaluated
$currentFolder.FullName
#retrieve the contents of the current folder and store it in "currentFolderArr"
$currentFolderArr = @(
Get-ChildItem $currentFolder.FullName -Recurse -Force -ErrorAction SilentlyContinue -Exclude 'dfsrprivate' |
Select-Object FullName, Length, PSIsContainer #this is a throwaway, just to populate the array for a count
)
#count the total number of files/folders in this current folder
$ItemCount = ($currentFolderArr | Measure-Object).Count
Could the count be added as a PSTree property?
The text was updated successfully, but these errors were encountered:
ps has a measure-object.count method which is what my current script uses as it iterates through the tree.
Could the count be added as a PSTree property?
The text was updated successfully, but these errors were encountered: