List the files in a zip file... VBA

Posted on 2012-08-30
Last Modified: 2012-09-18
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 in


and enter into tMyFiles.

Thank you.
Question by:Mike Eghtebas
    1 Comment
    LVL 44

    Accepted Solution

    Set SHL = CreateObject("Shell.Application") 
    For Each FileInZip In SHL.Namespace(("C:\users\aikimark\downloads\")).Items 
        'put your recordset addnew or SQL statements here

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

    737 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