Categories
Coding

Getting a list of all files

I do like PowerShell. Something that used to take 10-20 lines of VBS code, such as generating a report of all files stored within a folder, can now be reduced to a single line. Get-ChildItem “X:\Software” -recurse | Select-Object Name, Extension, Length, CreationTime, LastWriteTime, Fullname | Export-CSV “D:\File Report.csv”

I do like PowerShell. Something that used to take 10-20 lines of VBS code, such as generating a report of all files stored within a folder, can now be reduced to a single line.

Get-ChildItem "X:\Software" -recurse | Select-Object Name, Extension, Length, CreationTime, LastWriteTime, Fullname | Export-CSV "D:\File Report.csv"