I recently had a need to list the  properties of all files in a folder and its sub folders to find files that had not been used in a long time, or files where the owner had left. In my case I needed to run a report on approx 250,000 files which this VBS script managed.

The VBS script will get the following properties;

  • The file path and name
  • The file size file type
  • Date Created
  • Date Last Accessed
  • Date Last Modified
  • File Owner (not available for all files)

To use the VBS script download the attached file or copy the below script to a text file and save as something.vbs, run the script by double clicking on it, and browse to a folder you want to report on.

Depending on the number of files the VBS script may take a while to run, when it is complete a CSV file will be generated in the same folder as the script which can then be imported into something like Excel and you can do some nice reports. Remember Excel 2003 can only handle a maximum of 65,536 rows so if you have scanned more files than that then Excel 2007 will do the job.


Author: Phil Eddies

I am an IT Operations Manager, managing all aspects of the IT infrastructure and service for a mid sized UK based company. I have been working full time in IT since 2001 in 1st to 3rd line and System Administration roles. MCSA, MCSE, CCNA, Citrix CCA