+ Reply to Thread
Results 1 to 7 of 7

Import file contents (xml) from multiple zip files

  1. #1
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Import file contents (xml) from multiple zip files

    Good day all - hoping for a little assistance with a bit of a nagging problem, and one for which some of my coworkers say there is no way solve in VBA.

    My associates have saved about 2,000 .zip files in a single repository. Each zip file contains a .pdf, and a file called "metadata.xml" - the metadata files are small, only 1-2Kb.

    What I'd like to do is import the contents of each metadata.xml file into a single workbook so I can build an inventory of the pdf files.

    The full path looks like this:
    Z:\Princeton\Global Data\Financial Data\Financial Data\WC\FNDL_PRODUCTION\128650_TH1X0_ProTechLLC_A_Eng_BBOT__20140317132245.195_bbot.zip

    Everything up to and including FNDL_PRODUCTION is exactly the same for each file. Everything after, varies, and is not predictable.

    Any thoughts on the best way to do this? I'm thinking there is some way to say "for each file in repository, import metadata.xml content..." but I can't figure out how to do that.

    Thanks for any guidance!

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Import file contents (xml) from multiple zip files

    Here's a link to a few examples of this.
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Import file contents (xml) from multiple zip files

    Thank you... have used these in the past but never successfully - will give it another go.
    Thanks again (sorry for the delay, have been taking care of sick kids)

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Import file contents (xml) from multiple zip files

    Without any more details, like a few of the zip files, it's going to be difficult to provide any assistance. Giving us the path is really incidental.

    If you don't want to post any here, you can send a few to my email. Username @ gmail

  5. #5
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Import file contents (xml) from multiple zip files

    Tinbendr, thank you again. I've attached one of the smaller files - I'm only interested in the metadata.xlm.

    I have been able to compile the file contents by copying each "metadata" to a local directory, then importing to the first available row in my spreadsheet, deleting the local copy, then moving to the next zip. This seems to work, but is quite time consuming.

    I'm wide open, and grateful, for any better/faster/smarter approaches!

    JP

  6. #6
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Import file contents (xml) from multiple zip files

    This is real rough, but it seems to work. Change paths as required.
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Import file contents (xml) from multiple zip files

    Tinbendr - much appreciated. This will certainly help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Import multiple *.tsv files into one excel file
    By bing.pascual in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2013, 01:57 AM
  2. Import multiple jpg files in one file with file name in next cell
    By samyell in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2013, 07:58 AM
  3. Creating multiple files from a file based on field contents
    By charbomb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2011, 06:56 PM
  4. Replies: 14
    Last Post: 04-17-2008, 04:12 PM
  5. copying contents from multiple files into one file
    By arunjoshi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2005, 04:41 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1