<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Extracting text files from nested zip files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Extracting-text-files-from-nested-zip-files/m-p/793151#M254170</link>
    <description>Thanks for the reply. Much appreciated!</description>
    <pubDate>Fri, 28 Jan 2022 15:13:48 GMT</pubDate>
    <dc:creator>mitchell_keener</dc:creator>
    <dc:date>2022-01-28T15:13:48Z</dc:date>
    <item>
      <title>Extracting text files from nested zip files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extracting-text-files-from-nested-zip-files/m-p/793026#M254119</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to extract text files that are saved within multiple zip files. For example, I need to extract a text file within a structure such as "C:\Users\myname\Documents\files.zip\specifictextfile.zip\mydata.txt".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my case, each text file is saved within their own zip file inside "files.zip". I have been able to successfully extract the text file within a single zip level, so something like&amp;nbsp; "C:\Users\myname\Documents\specifictextfile.zip\mydata.txt" but I cannot get it out of the two level zips.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This resource was extremely helpful with extracting from a one level zip:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sasdummy/2015/05/11/using-filename-zip-to-unzip-and-read-data-files-in-sas/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2015/05/11/using-filename-zip-to-unzip-and-read-data-files-in-sas/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even if I could just extract the second level zips into their own folder, I could use the code at the link above to extract the text files from there. Does anyone know if this is possible or have any ideas how to do this? I could resort to manually extracting the "files.zip" first then using sas to read the txt files within each "specifictextfile.zip" zip, but I would rather not if possible. Let me know if I can provide additional information to assist with my question. The only example code I have was the code used in the blog to extract from a single zip file so I did not bother including it. Thanks so much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 23:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extracting-text-files-from-nested-zip-files/m-p/793026#M254119</guid>
      <dc:creator>mitchell_keener</dc:creator>
      <dc:date>2022-01-27T23:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting text files from nested zip files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extracting-text-files-from-nested-zip-files/m-p/793033#M254122</link>
      <description>&lt;P&gt;Nope.&amp;nbsp; Extract the embedded ZIP to a physical file, perhaps in your WORK directory.&amp;nbsp; Then you can extract the files from that ZIP file.&amp;nbsp; Repeat as many times as they have levels of nesting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is just a silly way to send data.&lt;/P&gt;
&lt;P&gt;They should have just copied the files from the sub-files into the target ZIP as folders.&amp;nbsp; Storing a ZIP file in a ZIP file is just adding work for you without any added value.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 23:48:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extracting-text-files-from-nested-zip-files/m-p/793033#M254122</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-27T23:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting text files from nested zip files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extracting-text-files-from-nested-zip-files/m-p/793151#M254170</link>
      <description>Thanks for the reply. Much appreciated!</description>
      <pubDate>Fri, 28 Jan 2022 15:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extracting-text-files-from-nested-zip-files/m-p/793151#M254170</guid>
      <dc:creator>mitchell_keener</dc:creator>
      <dc:date>2022-01-28T15:13:48Z</dc:date>
    </item>
  </channel>
</rss>

