Read and record file names...

Posted on 2012-08-30
Last Modified: 2012-08-30
I have one table called: tMyFiles

SELECT fileName, filePath, createdOn, fileSizeKbyte, FROM tMyFiles;

I want a procedure to read fileName, filePath, createdOn, fileSizeKbyte of each file.

Starting from root directory, it enters all file names but keeps the folder names in a two dimensional array.

Why two dimentsionl array: The first level folders (folders in the root directory) are recorded as:

MyFolder(1, 1)="C:\Budget"
MyFolder(1, 2)="C:\Vacation"
MyFolder(1, 3)="C:\School"

After the root directory files are audited, then attention is shifted to MyFolder(1, 1) or "C:\Budget" and after recording the files in this folder, all folders in MyFolder(1, 1) is recorded as:

MyFolder(2, 1)="C:\Budget\Food"
MyFolder(2, 2)="C:\Budget\Entertainmnet"

and so fort until all.

I do not expect all to be done via this question. Having some workable solution/ progress will be fine.

Thank you.
Question by:Mike Eghtebas
    LVL 119

    Accepted Solution

    start by using the codes from this link

    List files recursively
    LVL 33

    Author Closing Comment

    by:Mike Eghtebas
    Thank you.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now