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
Hi,
Many thanks for the script, i was evaluating / testing it out and it would seem when I took the approach of supplying an input file and including the parameter TestSubfolders e..g
it only evaluates that folder and the child folder one level deep not all child folders, i.e it missed folders.
I think you need to add the -recurse on this line and that will fix it
$FolderList = @(Get-ChildItem $FolderEntry -recurse -Directory -ea SilentlyContinue | Select -Expand FullName)
i am not a powershell expert but the above seemed to fix it.
Technically you could generate the input file with all the subfolder names, so possibly this is not even bug. I just assumed adding in some top level folders into the input file would also do the sub folders/ children. I like the approach of using an input file so i can batch the process by doing x folders at a time. Possibly an update to the explanation of testsubfolders is needed to explain what it does / does not do.
Appreciate this was last looked at 4 years ago, but if someone else happens to read this it maybe of use, rather than folders get missed.
The text was updated successfully, but these errors were encountered:
Hi,
Many thanks for the script, i was evaluating / testing it out and it would seem when I took the approach of supplying an input file and including the parameter TestSubfolders e..g
Get-FolderAge -inputfile "C:\Temp\FolderList.txt" -outputfile "C:\temp\FolderOutput.csv" -TestSubFolders
it only evaluates that folder and the child folder one level deep not all child folders, i.e it missed folders.
I think you need to add the -recurse on this line and that will fix it
$FolderList = @(Get-ChildItem $FolderEntry -recurse -Directory -ea SilentlyContinue | Select -Expand FullName)
i am not a powershell expert but the above seemed to fix it.
Technically you could generate the input file with all the subfolder names, so possibly this is not even bug. I just assumed adding in some top level folders into the input file would also do the sub folders/ children. I like the approach of using an input file so i can batch the process by doing x folders at a time. Possibly an update to the explanation of testsubfolders is needed to explain what it does / does not do.
Appreciate this was last looked at 4 years ago, but if someone else happens to read this it maybe of use, rather than folders get missed.
The text was updated successfully, but these errors were encountered: