Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_unzip.sas File Reference

Unzips a zip file. More...

Go to the source code of this file.

Detailed Description

Opens the zip file and copies all the contents to another directory. It is not possible to retain permissions / timestamps, also the BOF marker is lost so it cannot extract binary files.

Usage:

filename mc url
  "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc;

%mp_unzip(ziploc="/some/file.zip",outdir=/some/folder)

More info: https://blogs.sas.com/content/sasdummy/2015/05/11/using-filename-zip-to-unzip-and-read-data-files-in-sas/

Parameters
[in]ziploc=Fileref or quoted full path, eg: "/path/to/file.zip"
[out]outdir=(sysfunc(pathname(work))) Directory in which to write the outputs (created if needed)

SAS Macros

Version
9.4
Author
Allan Bowe @source https://github.com/sasjs/core

Definition in file mp_unzip.sas.