<?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 Unzip multiple zip files in databricks in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/unzip-multiple-zip-files-in-databricks/m-p/71467#M7367</link>
    <description>&lt;P&gt;I have a zip file which in turn has multiple zip files inside it. I tried to write a code in databricks notebook to unzip all these files at once, but I ran into an error. So I started to unzip these one by one, but the code which worked in unzipping the first file(parent zip file) does not work for the child zip files.&amp;nbsp; Should I have to follow a different approach?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# copy to dbfs
%fs cp 'abfss://testdata@flowwesteuropedevappsa.dfs.core.windows.net/lz/INDIA_archive_LTA1_0_20240530-142643067.zip' dbfs:/FileStore/shared_uploads

#rename files
old_name = r"dbfs:/FileStore/shared_uploads/INDIA_archive_LTA1_0_20240530-142643067.zip"
new_name = r"dbfs:/FileStore/shared_uploads/sample.zip"
dbutils.fs.mv(old_name, new_name)

#unzip parent file
%sh
unzip /dbfs/FileStore/shared_uploads/sample.zip

#here I get multiple zip files with the message inflating: zip1.zip, inflating: zip2.zip....

#unziping one child zip
%sh
unzip /dbfs/FileStore/shared_uploads/zip1.zip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jun 2024 12:09:19 GMT</pubDate>
    <dc:creator>traillog</dc:creator>
    <dc:date>2024-06-03T12:09:19Z</dc:date>
    <item>
      <title>Unzip multiple zip files in databricks</title>
      <link>https://community.databricks.com/t5/get-started-discussions/unzip-multiple-zip-files-in-databricks/m-p/71467#M7367</link>
      <description>&lt;P&gt;I have a zip file which in turn has multiple zip files inside it. I tried to write a code in databricks notebook to unzip all these files at once, but I ran into an error. So I started to unzip these one by one, but the code which worked in unzipping the first file(parent zip file) does not work for the child zip files.&amp;nbsp; Should I have to follow a different approach?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# copy to dbfs
%fs cp 'abfss://testdata@flowwesteuropedevappsa.dfs.core.windows.net/lz/INDIA_archive_LTA1_0_20240530-142643067.zip' dbfs:/FileStore/shared_uploads

#rename files
old_name = r"dbfs:/FileStore/shared_uploads/INDIA_archive_LTA1_0_20240530-142643067.zip"
new_name = r"dbfs:/FileStore/shared_uploads/sample.zip"
dbutils.fs.mv(old_name, new_name)

#unzip parent file
%sh
unzip /dbfs/FileStore/shared_uploads/sample.zip

#here I get multiple zip files with the message inflating: zip1.zip, inflating: zip2.zip....

#unziping one child zip
%sh
unzip /dbfs/FileStore/shared_uploads/zip1.zip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 12:09:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/unzip-multiple-zip-files-in-databricks/m-p/71467#M7367</guid>
      <dc:creator>traillog</dc:creator>
      <dc:date>2024-06-03T12:09:19Z</dc:date>
    </item>
  </channel>
</rss>

