Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

List the files in a zip file... VBA

Posted on 2012-08-30
1
Medium Priority
?
1,655 Views
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

C:\files.zip

and enter into tMyFiles.

Thank you.
0
Comment
Question by:Mike Eghtebas
1 Comment
 
LVL 46

Accepted Solution

by:
aikimark earned 2000 total points
ID: 38352815
Set SHL = CreateObject("Shell.Application") 
For Each FileInZip In SHL.Namespace(("C:\users\aikimark\downloads\test.zip")).Items 
    'put your recordset addnew or SQL statements here

Next 

Open in new window

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

580 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