Date: Wed, 12 Dec 2001 16:53:54 +0100
Reply-To: Ace <b.rogers@VIRGIN.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ace <b.rogers@VIRGIN.NET>
Subject: Re: access excel file
Content-Type: text/plain; charset=us-ascii
On 12 Dec 01 14:28:08 GMT, simon.pickles@BARCAP.COM wrote:
>Koen
>
>For further humiliation I couldn't resist mentioning the -ve second
>argument in SCAN(var,-1) style syntax to avoid REVERSE.
>
>if upcase(scan(filename,-1)) eq 'XLS';
>
>
>More seriously how would list members go about finding all files over a
>certain size (say 10 MB) in a Windows directory, including sub-
>directories ? I just spent all morning using SCL directory functions to do
>it and I guess a single DIR command output read into a data step would do.
>My DOS is not up to it though.
You don't really need much DOS, just something like:
options noxwait;
X 'DIR /S > fred.txt' ;
/* creates a text file - /S option also lists subdirectories */
data dirlist ;
infile 'fred.txt' lrecl=200 missover pad ;
input @25 dirchar $5. @ ;
if dirchar = '<DIR>' then input ;
else do ;
input @40 filename $40.
@25 size comma14. ;
output ;
end;
run;
Gives you the basis, although you'll need to expand it to remove
subtotal and blank lines too. But you get the idea...
--
Ace in Alsace