Efficiently Building Directory Listings

Soldato
Joined
25 Oct 2002
Posts
2,630
I have a file share with multiple millions of directories and tens of millions of files. I would like to to identify the paths to all files of a particular type but I'm not sure of the most efficient way of doing this.

At the most basic level I could use Powershell and recursively work from the top to the bottom with something like this, but I have no idea how it would behave over such a large structure.

Code:
get-childitem -force -recurse -filter "*.doc" | Select Name, FullName | Export-Csv dir.txt -Encoding ascii -NoTypeInformation

Does anyone have any experience or recommendations as to how to approach this?
 
Back
Top Bottom