Here is another option.
You may have to alter th
filename DIR pipe "dir ""c:\temp\*.sas"" /s/q " ;
data FILES;
infile DIR pad;
input X $256.;
length PATH FILENAME $256;
retain PATH ;
if index(X,'Directory of') then PATH=substr(X,14);
else if char(X,3)='/' and not index(X,'<DIR>') then do;
TOPDIR =catx('\',scan(PATH,1,'\'),scan(PATH,2,'\'),scan(PATH,3,'\'));
FILENAME=substr(X,65);
DATE =input(scan(X,1,' '),?? ddmmyy10.);
SIZE =input(scan(X,4,' '),?? comma20.);
OWNER =substr(X,42,23);
output;
end;
format DATE date9. SIZE comma20.0;
*drop X;
run;
e way the line is parsed as Windows changes the file description line depending on its coonfiguration.
... View more