• Reading File Names Into a Table

    Author
    Topic
    #476302

    Is there a way to read files names from a given directory and all it’s sub directories into a table using VBA code.

    I have some code that reads a single directory and dumps the files to a table, but am having trouble getting it to push down into sub directories.


    Thanks for any help.

    Viewing 0 reply threads
    Author
    Replies
    • #1277542

      Here is a web page that has VBA code to read the subdirectories in a folder: VBA Dir function to get Subdirectories
      This page has a VB6 procedure that creates a list: Get all Files and Subdirectories …
      Hopefully the two of those will give you some ideas in how to modify your existing code. One caution that comes to mind is that there may be some difference in directory designations between FAT32 and NTFS that the VB6 code may not be aware of – but I haven’t explored that angle.

    Viewing 0 reply threads
    Reply To: Reading File Names Into a Table

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: