Desktop productivity for business analysts and programmers

How to create tar.gz archive file in windows?

Reply
SAS Employee
Posts: 1

How to create tar.gz archive file in windows?

[ Edited ]

In sas code I need to create tar.gz file, and add to this file other external files such as csv, txt, zip. How can I do this?

Community Manager
Posts: 3,379

Re: How to create tar.gz archive file in windows?

Posted in reply to TurarovZh

See this post about GZ support in the SAS FILENAME statement.

 

Example:

 

filename source "C:\Logs\SEGuide_log.10168.txt";
filename tozip ZIP "C:\Logs\SEGuide_log.10168.txt.gz" GZIP;
 
data _null_;   
   infile source;
   file tozip ;
   input;
   put _infile_ ;
run;

Result:

sizediff (1).png

Super User
Super User
Posts: 7,934

Re: How to create tar.gz archive file in windows?

[ Edited ]
Posted in reply to TurarovZh

To make a tar file you will probably need third party software.  If you need to create a single file with multiple members you should try creating a ZIP file instead.

Ask a Question
Discussion stats
  • 2 replies
  • 94 views
  • 2 likes
  • 3 in conversation