LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


Back to: Top of message | Previous page | Main SAS-L page