go to the Access MVP home page           go to Crystal's Access Basics

ListFiles Database
by and modified by Crystal

Recursive File listing modified from code witten by Allen Browne.
Browser code originally written by Stephan Lebans.
GetComputerName written by Dev Ashish.

... if you want to help me out, it is much appreciated!


and, coming ... sometime ...
an updated version to get and set additional file information, written by the remarkable Wayne Phillips, who exposes hard-to-figure-out stuff :)

"Have you ever wanted to find out generic properties about a file, such as the duration length of an MP3 file, or the date a JPEG picture file was taken on a digital camera?" -Wayne

Even though I have not incorporated it yet, you can get this amazing capability from Wayne on EverythingAccess in the Access Tutorials section.

Accessing detailed file information provided by the Operating System
by Wayne Phillips
http://www.everythingaccess.com/tutorials.asp?ID=Accessing-detailed-file-information-provided-by-the-Operating-System
support for Windows XP, Vista, and Windows 7



      Read information about files stored on your computer and store the results in an Access database.
            Start from the root directory of a drive or specify a path.
 

Download ListFiles_080323_Crystal_090720CR.zip (208 K)  

Reads file name and file attribute information into a database -- can be done for one directory or a directory tree. NEEDS references to:

  • Microsoft Scripting Runtime (because all the information that can be obtained from the FSO object is also recorded)
  • Microsoft DAO # Object Library
    or
    Microsoft Office # Access Database Engine Object Library
This sample database can be distributed freely. If you are selling an application and wish to incorporate code or ideas, you will need to obtain written permission from all the authors.

The main benefit of this database is the data that it generates about the files stored on your computer. Any other objects such as queries and forms are probably not needed by the program unless they start with usys, which marks them as user system objects.

Best to Compile before you run. Look at Relationship diagram and Field Descriptions in each Table Design.






Comments

"May I hint you to check the underlying query for your form named "f_Showfiles". I've missed the path informations, but adding the table "Dirs" resolves that problem."

— Jens Schilling, Microsoft MVP, Access


Thank you for pointing this out, Jens ... guess I left some of my half-baked ideas in there... I never finished that form -- had great plans for it ;) Feel free to modify or just delete the f_Showfiles form

Now I have brilliant code written by Wayne Phillips that gets additional file properties that are exposed by Windows such as the Date and Time a picture was taken, or the Length of an MP3 file ... so I will update this database to include these new treasures (smile) ... sometime!



Free Book on Access: Access Basics

Free Tutorials: Video Tutorials

for information on private programming and training, or if you have comments and ideas, I'd love to hear from you

© Copyright 2009, 2010, 2011 Crystal Long.  All rights reserved.
Last Updated:  March 28, 2011

thanks to Arvin Meyer for setting up this site and giving Access MVPs a place to share with others.

110328 1347 MST
online MBA
Marketing MBA