"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,820 tips!

Windows XP and DOS

Output Directory to CSV File for Spreadsheet, Database

SUMMARY: FileList for Windows 2000, Windows XP, and Windows Vista outputs a directory to a CSV file for processing inside a spreadsheet or database.


 

For accounting or system maintenance purposes, it might prove useful to output the contents of a directory to a spreadsheet or database application. From there operations can be performed such as sorting and resorting files by various categories, querying the file catalog, and creating charts based on file sizes or other criteria.

To perform this task, JAM Software has created the filelist command for Windows 2000, Windows XP, and Windows Vista that outputs the contents of a directory to a .CSV file that can be imported into most spreadsheets or databases. After downloading the ZIP file, place filelist.exe in a directory contained in your system Path.


FileList can output directory listings to a CSV file that Microsoft Excel can open - you can then create a pie chart based on the file sizes




You can then create a CSV file like so:

filelist PATH > FILENAME

Where PATH is the directory path that should be outputted, i.e. . for the current directory, and FILENAME is your output filename of choice, i.e. dir.csv.

The following options are supported - these should be placed before the PATH:

/authors - adds the file authors of Microsoft Office documents, different from the document owners that are automatically added. The documentation warns this may add to processing time.

/attributes - adds file attributes to the output.

/filter - perform * and ? pattern matching to determine which files are outputted - multiple filters can be separated by semicolons.

/lastsavedate - adds the last date Microsoft Office documents were saved to the output.

/md5 - adds MD5 checksums to the output, useful for file duplicate checking, confirming the legitimacy of files, etc.

/noheader - removes column headers such as "Path" and "Size in Bytes".

/owners - adds file ownership information to the output (the documentation warns this may add to processing time).

Assuming you have an application that opens CSV files, the following outputs the executable contents of the current directory to a CSV file, opening it in the associated application:

filelist /filter *.exe . > dir.csv
start dir.csv


* FileList: http://www.jam-software.com/filelist/



Print This Tip

Get E-Mail When New Tips are Online

Return to the Windows XP and DOS page.

 


New in MalekTips:

RSS Feeds- Subscribe!

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Get Tips!'.
 


( sample / details )
( opt-out instructions )