<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic how to get list of files available in Directory including sub folder in SAS in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/430369#M13332</link>
    <description>&lt;P&gt;Hi , i was trying to get &amp;nbsp;list of files(.csv) available in Directory including sub folder in SAS,please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;%macro list_files(dir,ext);&lt;BR /&gt;%local filrf rc did memcnt name i;&lt;BR /&gt;%let rc=%sysfunc(filename(filrf,&amp;amp;dir));&lt;BR /&gt;%let did=%sysfunc(dopen(&amp;amp;filrf));&lt;/P&gt;&lt;P&gt;%if &amp;amp;did eq 0 %then %do;&lt;BR /&gt;%put Directory &amp;amp;dir cannot be open or does not exist;&lt;BR /&gt;%return;&lt;BR /&gt;%end;&lt;/P&gt;&lt;P&gt;%do i = 1 %to %sysfunc(dnum(&amp;amp;did));&lt;/P&gt;&lt;P&gt;%let name=%qsysfunc(dread(&amp;amp;did,&amp;amp;i));&lt;/P&gt;&lt;P&gt;/* %if %qupcase(%qscan(&amp;amp;name,-1,.)) = %upcase(&amp;amp;ext) %then %do;*/&lt;BR /&gt;%if %qscan(&amp;amp;name,2,.) ne %then %do;&lt;BR /&gt;%put &amp;amp;dir\&amp;amp;name;&lt;/P&gt;&lt;P&gt;data _tmp;&lt;BR /&gt;length dir $512 name $100;&lt;BR /&gt;dir=symget("dir");&lt;BR /&gt;name=symget("name");&lt;BR /&gt;run;&lt;BR /&gt;proc append base=want data=_tmp;&lt;BR /&gt;run;quit;&lt;/P&gt;&lt;P&gt;%end;&lt;BR /&gt;%else %if %qscan(&amp;amp;name,2,.) = %then %do;&lt;BR /&gt;%list_files(&amp;amp;dir\&amp;amp;name,&amp;amp;ext)&lt;BR /&gt;%end;&lt;/P&gt;&lt;P&gt;%end;&lt;BR /&gt;%let rc=%sysfunc(dclose(&amp;amp;did));&lt;BR /&gt;%let rc=%sysfunc(filename(filrf));&lt;/P&gt;&lt;P&gt;%mend list_files;&lt;BR /&gt;%list_files("C:\Users\sivakumar.sivaraj\Documents\Dataset",*)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error -&amp;nbsp;''&lt;SPAN&gt;The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;between a quoted string and the succeeding identifier is recommended''&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1 ;*'&lt;BR /&gt;_&lt;BR /&gt;49&lt;BR /&gt;1 ! ;*";*/;quit;run;&lt;BR /&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&lt;BR /&gt;between a quoted string and the succeeding identifier is recommended.&lt;/P&gt;&lt;P&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='Program'&lt;BR /&gt;_______________________________&lt;BR /&gt;49&lt;BR /&gt;3 ! ;&lt;/P&gt;&lt;P&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&lt;BR /&gt;between a quoted string and the succeeding identifier is recommended.&lt;/P&gt;&lt;P&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH='';&lt;BR /&gt;6 %LET _CLIENTPROJECTNAME='';&lt;BR /&gt;7 %LET _SASPROGRAMFILE=;&lt;BR /&gt;8&lt;BR /&gt;9 ODS _ALL_ CLOSE;&lt;BR /&gt;10 OPTIONS DEV=ACTIVEX;&lt;BR /&gt;11 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;12 FILENAME EGSR TEMP;&lt;BR /&gt;13 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;14 STYLE=HtmlBlue&lt;BR /&gt;15 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")&lt;BR /&gt;NOTE: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation&lt;BR /&gt;marks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jan 2018 11:57:07 GMT</pubDate>
    <dc:creator>sivastat08</dc:creator>
    <dc:date>2018-01-24T11:57:07Z</dc:date>
    <item>
      <title>how to get list of files available in Directory including sub folder in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/430369#M13332</link>
      <description>&lt;P&gt;Hi , i was trying to get &amp;nbsp;list of files(.csv) available in Directory including sub folder in SAS,please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;%macro list_files(dir,ext);&lt;BR /&gt;%local filrf rc did memcnt name i;&lt;BR /&gt;%let rc=%sysfunc(filename(filrf,&amp;amp;dir));&lt;BR /&gt;%let did=%sysfunc(dopen(&amp;amp;filrf));&lt;/P&gt;&lt;P&gt;%if &amp;amp;did eq 0 %then %do;&lt;BR /&gt;%put Directory &amp;amp;dir cannot be open or does not exist;&lt;BR /&gt;%return;&lt;BR /&gt;%end;&lt;/P&gt;&lt;P&gt;%do i = 1 %to %sysfunc(dnum(&amp;amp;did));&lt;/P&gt;&lt;P&gt;%let name=%qsysfunc(dread(&amp;amp;did,&amp;amp;i));&lt;/P&gt;&lt;P&gt;/* %if %qupcase(%qscan(&amp;amp;name,-1,.)) = %upcase(&amp;amp;ext) %then %do;*/&lt;BR /&gt;%if %qscan(&amp;amp;name,2,.) ne %then %do;&lt;BR /&gt;%put &amp;amp;dir\&amp;amp;name;&lt;/P&gt;&lt;P&gt;data _tmp;&lt;BR /&gt;length dir $512 name $100;&lt;BR /&gt;dir=symget("dir");&lt;BR /&gt;name=symget("name");&lt;BR /&gt;run;&lt;BR /&gt;proc append base=want data=_tmp;&lt;BR /&gt;run;quit;&lt;/P&gt;&lt;P&gt;%end;&lt;BR /&gt;%else %if %qscan(&amp;amp;name,2,.) = %then %do;&lt;BR /&gt;%list_files(&amp;amp;dir\&amp;amp;name,&amp;amp;ext)&lt;BR /&gt;%end;&lt;/P&gt;&lt;P&gt;%end;&lt;BR /&gt;%let rc=%sysfunc(dclose(&amp;amp;did));&lt;BR /&gt;%let rc=%sysfunc(filename(filrf));&lt;/P&gt;&lt;P&gt;%mend list_files;&lt;BR /&gt;%list_files("C:\Users\sivakumar.sivaraj\Documents\Dataset",*)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error -&amp;nbsp;''&lt;SPAN&gt;The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;between a quoted string and the succeeding identifier is recommended''&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1 ;*'&lt;BR /&gt;_&lt;BR /&gt;49&lt;BR /&gt;1 ! ;*";*/;quit;run;&lt;BR /&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&lt;BR /&gt;between a quoted string and the succeeding identifier is recommended.&lt;/P&gt;&lt;P&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='Program'&lt;BR /&gt;_______________________________&lt;BR /&gt;49&lt;BR /&gt;3 ! ;&lt;/P&gt;&lt;P&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&lt;BR /&gt;between a quoted string and the succeeding identifier is recommended.&lt;/P&gt;&lt;P&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH='';&lt;BR /&gt;6 %LET _CLIENTPROJECTNAME='';&lt;BR /&gt;7 %LET _SASPROGRAMFILE=;&lt;BR /&gt;8&lt;BR /&gt;9 ODS _ALL_ CLOSE;&lt;BR /&gt;10 OPTIONS DEV=ACTIVEX;&lt;BR /&gt;11 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;12 FILENAME EGSR TEMP;&lt;BR /&gt;13 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;14 STYLE=HtmlBlue&lt;BR /&gt;15 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")&lt;BR /&gt;NOTE: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation&lt;BR /&gt;marks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 11:57:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/430369#M13332</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2018-01-24T11:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to get list of files available in Directory including sub folder in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/430376#M13333</link>
      <description>&lt;P&gt;Sorry, I can't read that.&amp;nbsp; What software are you using, is it Windows/Unix/Server based?&amp;nbsp; Simplest method is to use the operating system if you have access, so for windows:&lt;/P&gt;
&lt;PRE&gt;filename tmp pipe 'dir "c:/somewhere/*.csv" /b /s';

data want;
  infile tmp dlm="¬";
  length cmd_line $2000;
  input cmd_line;
run;&lt;/PRE&gt;
&lt;P&gt;Want then contains the basics directory listing (/b) with all subdirectories (/s) only csv files.&amp;nbsp; Without more on the rest of the process its hard to say.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 12:17:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/430376#M13333</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-01-24T12:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to get list of files available in Directory including sub folder in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/430380#M13334</link>
      <description>Thanks for quick replay.</description>
      <pubDate>Wed, 24 Jan 2018 12:22:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/430380#M13334</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2018-01-24T12:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to get list of files available in Directory including sub folder in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/514928#M15993</link>
      <description>&lt;P&gt;Nice &amp;amp; simple, BUT try it with sub folders with spaces in the folder names.&amp;nbsp; I'd like to see a fix for that beside renaming others' folders.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use X to call dos commands and read in the results:&lt;/P&gt;
&lt;P&gt;OPTIONS NOXWAIT;&lt;/P&gt;
&lt;P&gt;X "cd c:\folder\sub folder\";&lt;/P&gt;
&lt;P&gt;X "dir&amp;nbsp; *.csv&amp;nbsp; /b /s &amp;gt; files.txt";&lt;/P&gt;
&lt;P&gt;DATA MyListOfcsvFiles;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; INFILE 'files.txt' LRECL=256 PAD MISSOVER;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; INPUT filenames $ 1-256;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *256 is still the max path length allowed in dos/windows *;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 21:39:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/514928#M15993</guid>
      <dc:creator>rickpaulos</dc:creator>
      <dc:date>2018-11-20T21:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to get list of files available in Directory including sub folder in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/514929#M15994</link>
      <description>&lt;P&gt;PAD MISSOVER?? There is the TRUNCOVER option available for the INFILE statement now (only been around for about the last 30 years I think).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the trick of using a strange character for the delimiter should eliminate the need for TRUNCOVER.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course both will have issues with filenames with leading spaces.&amp;nbsp; For that you could use $CHAR or $VARYING informat or just use the _INFILE_ automatic variable.&lt;/P&gt;
&lt;P&gt;And for trailing spaces you will need to keep track of how many characters were on the original source line.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 21:47:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/514929#M15994</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-11-20T21:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to get list of files available in Directory including sub folder in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/514942#M15995</link>
      <description>&lt;P&gt;You learn what your teachers are comfortable with.&amp;nbsp; 30 years ago?&amp;nbsp; That's about when I started learning SAS for DOS and I was assisted by older people who probably never read about updates. The local references were the thick v6 manuals that cost so much, they are still around. Truncover is not in those. And I prefer to avoid gimmicks in any programming language.&amp;nbsp; Keep it simple and easy to read and understand.&amp;nbsp; If you want cryptic gimmicks, try R.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Putting spaces in folder names, file names, Access column names, etc will mess up some languages for sure.&amp;nbsp; SAS is no exception.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 22:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/514942#M15995</guid>
      <dc:creator>rickpaulos</dc:creator>
      <dc:date>2018-11-20T22:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to get list of files available in Directory including sub folder in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/515021#M15996</link>
      <description>&lt;P&gt;So you reply to a post from nearly a year ago to tell me that in your special circumstance whereby you are putting special characters in a path - something which is highly recommended not to do - the code doesn't work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 09:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/515021#M15996</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-21T09:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to get list of files available in Directory including sub folder in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/515503#M16004</link>
      <description>&lt;P&gt;I've got a fleshed out macro that generates a dataset for the files in a directory and optionally subdirectories with file name, size, data and time, he the full and reletive paths. No issues with spaces etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Works for Windows using the file pipe mechanism (hence needs XCMDS), I have a Linux port of it knockign around as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Long had a plan to move the the dread stuff, to avoid XCMDs, but there isn't as much functionality down that route IMHO.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 08:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/515503#M16004</guid>
      <dc:creator>AngusLooney</dc:creator>
      <dc:date>2018-11-23T08:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to get list of files available in Directory including sub folder in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/515504#M16005</link>
      <description>&lt;P&gt;Spaces in paths will always come back to annoy you, but you can cope with them, just ends up riving you mad with macro resolution, single and double quotes etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In columns names, best avoided.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 08:31:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/515504#M16005</guid>
      <dc:creator>AngusLooney</dc:creator>
      <dc:date>2018-11-23T08:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to get list of files available in Directory including sub folder in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/598740#M18259</link>
      <description>&lt;P&gt;This MACRO should help too:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*MACRO TO GET ALL FILE NAMES AND DETAILS WITHIN A DIRECTORY*/
	%MACRO GET_FILE_NAMES(FILE_DIR	,COMMON_FILE_NAME ,FILE_FORMAT	,DATA_OUT);

		FILENAME LS PIPE "dir &amp;amp;FILE_DIR.&amp;amp;COMMON_FILE_NAME.*.&amp;amp;FILE_FORMAT.";
		DATA FILE_NAMES (KEEP=LIST_FILE); 
			INFILE LS PAD TRUNCOVER EXPANDTABS ; 
			INPUT FILE_NAMES $10000.;
			LIST_FILE = COMPRESS('"'||FILE_NAMES||'"');
		RUN;
		PROC SQL;	SELECT LIST_FILE 	AS LIST_FILE		INTO:	LIST_FILE_1 - 		FROM FILE_NAMES; QUIT;
		PROC SQL; 	SELECT COUNT(*) 	AS NUM_OF_SEARCHES	INTO: 	NUM_OF_SEARCHES		FROM FILE_NAMES;	QUIT;

		%DO Z = 1 %TO &amp;amp;NUM_OF_SEARCHES.;
			DATA RAW_WANT;			
				FILENAME LISA &amp;amp;&amp;amp;LIST_FILE_&amp;amp;Z..; 
				INFILE LISA TRUNCOVER ;
				FORMAT FILE_NAME $20000.;
				FILE_NAME 	= 	&amp;amp;&amp;amp;LIST_FILE_&amp;amp;Z..;
				FLIE_SIZE	=	FINFO(FOPEN('LISA') 		,'FILE SIZE (BYTES)');
				FORMAT MOD_DATE DATETIME.;
   				MOD_DATE	=	INPUT(FINFO(FOPEN('LISA')	,'LAST MODIFIED'), DATETIME.);     
   			    RIGHTS		=	FINFO(FOPEN('LISA')			,'ACCESS PERMISSION');      
		 		OWNER		=	FINFO(FOPEN('LISA')			,'OWNER NAME');      
			RUN;

			PROC APPEND DATA = RAW_WANT BASE = WANT_1 FORCE; RUN;
		%END;
		DATA &amp;amp;DATA_OUT.; 	SET WANT_1; 		RUN;
		PROC DATASETS;		DELETE WANT_1 RAW_WANT FILE_NAMES;	RUN;
	%MEND GET_FILE_NAMES;

/*INPUT PARAMETERS HERE*/
	%GET_FILE_NAMES (FILE_DIR  			= \Users\abc\Desktop\ 		/* SPECIFY THE DIRECTORY LOCATION HERE*/
				   , COMMON_FILE_NAME 	= HAVE_NAME     			/* FILE COMMON NAME, YOU CAN PUT "*" HERE TO SELECT ALL FILE NAMES*/
				   , FILE_FORMAT 		= txt 						/* FILE FORMAT,  YOU CAN PUT "*" HERE TO SELECT ALL FILE FORMATS WITHIN THE DIRECTORY*/
				   , DATA_OUT			= WANT);		   			&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Oct 2019 15:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-list-of-files-available-in-Directory-including-sub/m-p/598740#M18259</guid>
      <dc:creator>NiyiAwe1</dc:creator>
      <dc:date>2019-10-23T15:27:15Z</dc:date>
    </item>
  </channel>
</rss>

