/*
Find files with name including certain
string in a directory
Songlin Zhu
Ph.D.
path:
Directory where files
stored
search_string: string shown in those file
names
at_end: at_end = Y --
string located at
the
end of a
filename
at_end ne Y -- don't care string
location
output: File names saved in the data set named
file_names
in the
work
library */
%macro title_1;
%if &at_end. = Y %then title2 "(Search string
'&search_string.' is located at the end of a filename)";
%else title2 "(Don't care location of search string
'&search_string.')";
%mend title_1;
proc print data = work.file_names;
title1 "List files in the directory of &path.";
%title_1;
run; A SCL program was
invoked by above program. Download the
SCL program and save it in the directory c:\sasuser\cat. If you
want to save it in another directory, change c:\sasuser\cat into the
directory you save the SCL program.
If you have any questions, feel free to send me feedback.