Return to Archive

SAS Tip of the Month
March 2008

I sometimes want to get a listing of all the SAS programs for a particular directory. There are a large number of solutions available, but here is my favourite using PIPE within SAS:

    filename dircmd pipe "dir /b C:\TUAI\TABLES";
    data dirfile;
       length filelst $256;
       infile dircmd missover length=len;
       input filelst $varying246. len;
    run;
________________________________
Updated March 1, 2008