BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vanness145
Fluorite | Level 6

Hi guys,

 

I have a zip file with nested folders inside the zip file. 

 

This is what I have managed to get so far. But for every zip file, the folder name highlighted in green is changing (do not have a fixed name).

 

FILENAME ziplib zip "&path.\&yyyymm.\Download_20210913164726.zip";
FILENAME readfile "%sysfunc(getoption(work))\TEST123.TXT";
data _null_;
infile ziplib("PRDMobius\BPS007R\20210903053521\TEST123.TXT");
file readfile ;
input;
put _infile_;
run;

 

What I would want is wildcard on the folder name as per below but clearly this isn't working. Anyone can help me with this? I have zero idea....

 

FILENAME ziplib zip "&path.\&yyyymm.\Download_20210913164726.zip";
FILENAME readfile "%sysfunc(getoption(work))\TEST123.TXT";
data _null_;
infile ziplib("PRDMobius\BPS007R\*\TEST123.TXT");
file readfile ;
input;
put _infile_;
run;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
1 REPLY 1
vanness145
Fluorite | Level 6
Found this article which is pretty helpful for my query....
https://blogs.sas.com/content/sasdummy/2016/10/16/filename-zip-list-file-contents/

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 983 views
  • 0 likes
  • 1 in conversation