Help using Base SAS procedures

Zipping Multiple Files

Reply
Contributor
Posts: 42

Zipping Multiple Files

Hi Guys,

I am attempting to compress a series of files (the file extensions and names bare no relationship from file to file). I have attempted to use Systask and X command (I haven't used x before, so perhaps there is an idiosyncrasies of which I am not aware), with little success. I have used a variety of the suggestions from SUGI's and other internet resources and in the end all I can suggest is that I am doing something wrong. Could someone tell me what I am doing wrong?

Options XSync XSymbol OBS = MAX;

x ‘c:\progra~1\winzip\winzip32.exe –a –s"pass1234"
\\server\sas\transport\derived.zip
\\server\sas\data\derived\ae.sas7bdat
\\server\sas\data\derived\demog.sas7bdat’;

systask command "c:\progra~1\winzip\winzip32.exe –m
&outData.\OSTPIRecs_&ReportDate..zip
&outData.\osdebtexaminer&eom..xls
&outData.\osdebtdetailed&eom..xls
&outData.\osdebtinssummary&eom..xls
&outData.\osdebtmain5&eom..xls
&outData.\osdebtssummary&eom..xls
&outData.\Summary_Outstanding_Recoveries_Third_Party_Insurer_&eom..xls";
taskname = zip;
waitfor zip;
systask kill zip;

Regards,
Scott
SAS Super FREQ
Posts: 8,744

Re: Zipping Multiple Files

Hi:
This previous forum posting contains the X command that worked for me. I had the list of files to zip in a TXT file:
http://support.sas.com/forums/thread.jspa?messageID=8138Ὴ

I know there are other solutions using PKZIP. If you still have issues you might consider contacting SAS Tech Support for more help.

cynthia
Contributor
Posts: 42

Re: Zipping Multiple Files

Thank you Cynthia you are a godsend.
Ask a Question
Discussion stats
  • 2 replies
  • 149 views
  • 0 likes
  • 2 in conversation