Skip to main content

Command Palette

Search for a command to run...

Fast Method to Obtain All File Info from a Directory Tree

Updated
1 min read
FileList \\Server\Documents > ListOfFiles.csv

FileList is a command-line utility that generates a CSV file listing the contents of a given directory. By default, the list includes the file name, size, and path, as well as the last-access, last-modified, and creation dates, etc. You can easily import all results to a spreadsheet or database.

This utility supports additional arguments to control what information you need.

.\FileList.exe /A * /NOTITLE /ADDITIONALCOLUMNS FILES,ATTRIBUTES "\\Server\Documents" > ListOfFiles.csv

In this, you won't have title info, and you will also get the number of files in a folder and their attributes.

If you want to send the output of this utility to both the console and a file, use the Tee-Object in PowerShell.

.\FileList.exe /A * /NOTITLE /ADDITIONALCOLUMNS FILES,ATTRIBUTES "\\Server\Documents" | Tee-Object -FilePath "ListOfFiles.csv"

More from this blog

Fix, Build, Automate

17 posts

Straightforward solutions for modern tech problems