TITLE: Getting a list of matching files in Windows SUPPORT: Richard A. DeVenezia TYPE: macro INTERNET ADDRESS: http://www.devenezia.com MAILING ADDRESS: 9949 East Steuben Road, Remsen, NY 13438 PHONE NUMBER: SAS PRODUCTS NEEDED: Base OPERATING SYSTEM(S): Windows NT/95 SAS SYSTEM VERSION: 6.11 or later (uses function ModuleN) OTHER SOFTWARE NEEDED: KEYWORDS: Dir,Filespec,Wildcard,Search,List This macro runs a datastep that calls functions in Windows' kernel to obtain a list of files that match a search string which can contain * and ?. If you need the list of files from a DIR command, then this macro may be of interest. When you run an X 'DIR ...' command you will notice the flash of a DOS window opening and closing. I found it annoying, and no way around it. So was born %FileList. Usage: %FileList (, ); Example: %FileList (C:\My Data Files\*.NEW, WORK.NEWLIST); %FileList (\\CorporateUNC\Lab Results\New England\XRAY*.DAT, WORK.XRYFILES);