<?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 Using Winzip command line utility to password protect zip in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-Winzip-command-line-utility-to-password-protect-zip/m-p/254904#M48656</link>
    <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have been using ODS Package to create zip files but now find myself needing to encrypt the&amp;nbsp;files within.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have used the code below successfully but&amp;nbsp;only if adding one file - I can't get it to work when adding two.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_ ;&lt;BR /&gt;zipexe = '"C:\Program Files (x86)\WinZip\WINZIP32.exe" -min -a -s';&lt;BR /&gt;pw="&amp;amp;pwdit";&lt;BR /&gt;zipfile="C:\test.zip";&lt;BR /&gt;file="C:\test 1.pdf";&lt;BR /&gt;cmd=zipexe || pw || ' ' || zipfile || ' ' || files ;&lt;BR /&gt;putlog "NOTE-Processing command " cmd ;&lt;BR /&gt;call system( cmd ) ;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help with adding multiple files? &amp;nbsp;The filenames will have spaces in them hence the need for double quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or if I create the zip file using ODS package, does anyone know if I can then use the winzip command line utility to open an existing zip file and apply the encryption?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Mar 2016 09:58:51 GMT</pubDate>
    <dc:creator>kimdukes77</dc:creator>
    <dc:date>2016-03-07T09:58:51Z</dc:date>
    <item>
      <title>Using Winzip command line utility to password protect zip</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Winzip-command-line-utility-to-password-protect-zip/m-p/254904#M48656</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have been using ODS Package to create zip files but now find myself needing to encrypt the&amp;nbsp;files within.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have used the code below successfully but&amp;nbsp;only if adding one file - I can't get it to work when adding two.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_ ;&lt;BR /&gt;zipexe = '"C:\Program Files (x86)\WinZip\WINZIP32.exe" -min -a -s';&lt;BR /&gt;pw="&amp;amp;pwdit";&lt;BR /&gt;zipfile="C:\test.zip";&lt;BR /&gt;file="C:\test 1.pdf";&lt;BR /&gt;cmd=zipexe || pw || ' ' || zipfile || ' ' || files ;&lt;BR /&gt;putlog "NOTE-Processing command " cmd ;&lt;BR /&gt;call system( cmd ) ;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help with adding multiple files? &amp;nbsp;The filenames will have spaces in them hence the need for double quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or if I create the zip file using ODS package, does anyone know if I can then use the winzip command line utility to open an existing zip file and apply the encryption?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 09:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Winzip-command-line-utility-to-password-protect-zip/m-p/254904#M48656</guid>
      <dc:creator>kimdukes77</dc:creator>
      <dc:date>2016-03-07T09:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Winzip command line utility to password protect zip</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Winzip-command-line-utility-to-password-protect-zip/m-p/254909#M48658</link>
      <description>&lt;P&gt;Best solution: get rid of the ****ing blanks in filenames. Use underscores instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next best solution:&lt;/P&gt;
&lt;PRE&gt;file='"C:\test 1.pdf"';&lt;/PRE&gt;
&lt;P&gt;(encapsulate double quotes with single quotes, so the double quotes end up in the data step variable)&lt;/P&gt;
&lt;P&gt;If you need to process a list of files, either use wildcard characters or make sure that every single filename has the double quotes.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 10:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Winzip-command-line-utility-to-password-protect-zip/m-p/254909#M48658</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-03-07T10:22:24Z</dc:date>
    </item>
  </channel>
</rss>

