<?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: How to unzip file into a specific directory in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798525#M313938</link>
    <description>&lt;P&gt;The -z option makes tar filter the archive through gzip first.&lt;/P&gt;
&lt;P&gt;It's similar to&lt;/P&gt;
&lt;PRE&gt;gzip -dc file.tar.gz|tar -xvf -&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Feb 2022 09:37:17 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-02-25T09:37:17Z</dc:date>
    <item>
      <title>How to unzip file into a specific directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798502#M313921</link>
      <description>&lt;P&gt;I am using "x tar" to unzip file (PC/WINDOWS). It works but not into the specified directory(e:\outsas), rather&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it lands in c:/users/myid. Anyone has idea?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;x tar -zxvf e:\20210618.tar.gz index_md_20210618.csv -C e:\outsas;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 02:34:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798502#M313921</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-25T02:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to unzip file into a specific directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798507#M313923</link>
      <description>&lt;P&gt;You need to lookup the syntax for tar.&lt;/P&gt;
&lt;P&gt;You also need to quote the x command.&lt;/P&gt;
&lt;P&gt;You also need to change the title of your post, there's no zip in sight.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 04:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798507#M313923</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-02-25T04:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to unzip file into a specific directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798510#M313925</link>
      <description>&lt;P&gt;SAS has nothing to do with it, it's a matter of tar usage.&lt;BR /&gt;I recommend that you first make sure that tar can be handled properly at the command prompt without using x statement, and then implement it with sas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know, I haven't tried it, but the -C option of the tar command may not be supported except for the system drive.&lt;/P&gt;
&lt;P&gt;In that case, you can use the cd command and execute the following beforehand.&lt;/P&gt;
&lt;PRE&gt;cd /D e:\outsas&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, if you want to write it in one line, it would look like this&lt;/P&gt;
&lt;PRE&gt;cd /D e:\outsas &amp;amp; tar -zxvf e:\20210618.tar.gz index_md_20210618.csv&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give it a try.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 04:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798510#M313925</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2022-02-25T04:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to unzip file into a specific directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798525#M313938</link>
      <description>&lt;P&gt;The -z option makes tar filter the archive through gzip first.&lt;/P&gt;
&lt;P&gt;It's similar to&lt;/P&gt;
&lt;PRE&gt;gzip -dc file.tar.gz|tar -xvf -&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 09:37:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798525#M313938</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-25T09:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to unzip file into a specific directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798531#M313940</link>
      <description>&lt;P&gt;Thanks every one. I tried above at prompt and it works.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 11:37:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798531#M313940</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-25T11:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to unzip file into a specific directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798532#M313941</link>
      <description>&lt;P&gt;Also tried with SAS. It works. BUT with an issue the prompt stays and SAS chokes up until the prompt exits.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to exit the prompt automatically?!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 11:40:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798532#M313941</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-25T11:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to unzip file into a specific directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798549#M313949</link>
      <description>&lt;P&gt;use noxwait option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options noxwait;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Feb 2022 14:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/798549#M313949</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2022-02-25T14:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to unzip file into a specific directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/799281#M314279</link>
      <description>&lt;P&gt;You can unzip without the use of X command using this macro:&amp;nbsp;&lt;A href="https://core.sasjs.io/mp__unzip_8sas.html" target="_blank"&gt;https://core.sasjs.io/mp__unzip_8sas.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 11:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-unzip-file-into-a-specific-directory/m-p/799281#M314279</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-03-01T11:15:54Z</dc:date>
    </item>
  </channel>
</rss>

