Export all filenames in a directory to a CSV file via Powershell

You can run this snippet in Powershell in any folder (on Windows) and it will create a CSV with all filenames in that folder.

PowerShell
Get-ChildItem -File | Select-Object Name, FullName, Length, LastWriteTime |
    Export-Csv -Path ".\FileList.csv" -NoTypeInformation -Encoding UTF8 -Delimiter ";"

By Leendert de Borst

Freelance software architect with 15+ years of experience. Expert in translating complex technical problems into creative & simple solutions.