In this blog post i will discuss document some PowerShell scripts that will help you
- Get List of files in a Folder path recursively and export to a CSV file the output with the files meta data information like ( Directory, Name, Length, CreationTime, LastWriteTime, LastAccessTime, FullName, Extension )
- Get Distinct COUNT of File extensions inside a folder path recursively.
Get List of files recursively and export to a CSV file with the files meta data information
Open PowerShell
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
Get-Childitem "C:\Bharath\Files" -Recurse | where { -not $_.PSIsContainer } | Select Directory, Name, Length, CreationTime, LastWriteTime, LastAccessTime, FullName, Extension | Export-Csv "C:\Users\E317351\Desktop\FileswithSize.txt"
Get Distinct COUNT of File extensions inside a folder path recursively.
Open PowerShell
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
Get-Childitem "C:\Bharath\Desktop\Some Folders" -Recurse | where { -not $_.PSIsContainer } | group Extension -NoElement | sort count -desc
Exclude some folder (use -exclude) parameter as below
Get-Childitem "C:\Bharath\Desktop\Some Folders" -exclude TestFolderName -Recurse | where { -not $_.PSIsContainer } | group Extension -NoElement | sort count -desc