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.

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

By Leendert de Borst

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

Leave a comment

Your email address will not be published. Required fields are marked *