UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Store Directory Data To A Table (next Ver), Any Version    
 
   
CyberCow
post Oct 14 2006, 03:04 PM
Post #1

UdderAccess Admin + UA Ruler
Posts: 15,684
From: Upper MI



UPDATED: June 22, 2010

Sometimes, I just need to copy an entire directory listing (and optionally all of its subdirectories and filenames) into a table so I can play with or compare the contents. Also, once in a table, I can use that info to perform other file functions through VBA.

Written in Access 97, versions A97, A2K, A2K3 and A2K7 are included in the attachment. All three flavors tested well in their respective vesrions and all convert up to A2K10. Several folks here at UA have contributed this by virtue of having similar discussions in partial veins. What this does different is that it provides the option to acquire subdirectories as well. Among them are Freakazeud, Ben Purser, Glen Kruger, ghudson, Larry Larsen and others. Dev Ashish supplied the Browse Folder Dialog API.

This version also allows for several subdirectory levels deep (as suggested by UA member: Paul Sussex). Up to 12.

(IMG:http://www.endprod.com/scrshts/dtt/dtt.gif)
(click image above to download if attachment doesn't work)

How it works: There is a template table named 'USysTblFileDirTemplate' - this provides the base for a new table that the user will name. Then, the user selects a directory to gather info from. Once the directory is selected, opt to get all subdir info as well. After execution, a success message will appear and the new table is viewable with the "View Your Table" button. (Note: Selecting a greater number of subdirectories than exist will not be a problem)

Two Library References are used in this demo: 'Microsoft Scripting Runtime' & 'DAO'. And because I'm guessing that folks who want this tool will generally incorporate this feature into an existing database, there is no fancy interface; just a simple, easy to use set of controls and prompts to acquire file dires\ctory information into a table.

I've used this tool to get the info from two similarly named directoies on our network to do some comparison analysis and it proved quite handy. I hope you find it usefull as well.

Tested in A97, A2K, A2K3, A2K7 & A2K10
Attached File(s)
Attached File  dirtotable.zip ( 259.72K ) Number of downloads: 188
 
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 02:21 PM