01-17-2012 01:30 PM
My task is to list out all files in my current directory which has about 3 sub directories . As we have EG , all pipe commands are disabled but I am able to list out all file names in a dataset by using following code but however I am unable to tweak it for all sub folders as these 3 subdirectories also have 4 folders each. Basically its Q1, Q2 and Q3 and then Q1 consists of folders of January, February and so on .... Need help in modifying this code to take care of all folders....or else if any alternative is there without pipes..plz let me know
filename _folder_ "%bquote(\\jafiles01\SAS Folder\)";
if handle > 0 then do;
do i=1 to count;
filename _folder_ clear;
01-18-2012 12:05 PM
Take a look at Jason Secosky's excellent paper "User-Written DATA Step Functions." Specifically, look at the "directory traversal example." I would include a link but copy/paste doesn't work for me in this forum.