<?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 Re: How to: List all the files in a folder( Ans previously ) .How to get the the date time for files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/815952#M322042</link>
    <description>&lt;P&gt;For every file found, define a FILENAME like for the directory (use a different fref variable). Use FOPEN to open the file, then you can use the FOPTNUM, FOPTNAME and FINFO functions to get the file metadata. Read the relevant documentations for this.&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2022 19:56:37 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-05-31T19:56:37Z</dc:date>
    <item>
      <title>How to: List all the files in a folder( Ans previously ) .How to get the the date time for files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/815893#M322018</link>
      <description>&lt;P&gt;I recently came across your solution post about how to get the list of the files in a folder using the SAS functions.&amp;nbsp; Extension to that request, I would like to get the last modified or created dates of those files as variable in my dataset. Is&amp;nbsp; there any SAS function that will helps us to get it? I&amp;nbsp;am sorry if this question already answered ( unfortunately&amp;nbsp;I could not find it). Here is the old post and solution link (thanks to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;).&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Old post link:&lt;/SPAN&gt;&lt;A title="Re: Need alternative of &amp;quot;Filename&amp;quot; statement with Pipe operator for SAS University Edition" href="https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder/td-p/674065" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder/td-p/674065&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data filenames;
length fref $8 fname $200;
did = filename(fref,'&amp;amp;path');
did = dopen(fref);
do i = 1 to dnum(did);
  fname = dread(did,i);
  output;
end;
did = dclose(did);
did = filename(fref);
keep fname;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 May 2022 16:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/815893#M322018</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-05-31T16:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to: List all the files in a folder( Ans previously ) .How to get the the date time for files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/815897#M322020</link>
      <description>&lt;P&gt;Take a look at&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1bhwd0nlni4own1ia79mj0n29hv.htm" target="_self"&gt;DINFO Function&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 16:30:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/815897#M322020</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2022-05-31T16:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to: List all the files in a folder( Ans previously ) .How to get the the date time for files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/815952#M322042</link>
      <description>&lt;P&gt;For every file found, define a FILENAME like for the directory (use a different fref variable). Use FOPEN to open the file, then you can use the FOPTNUM, FOPTNAME and FINFO functions to get the file metadata. Read the relevant documentations for this.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 19:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/815952#M322042</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-31T19:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to: List all the files in a folder( Ans previously ) .How to get the the date time for files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/815988#M322049</link>
      <description>&lt;P&gt;Or try dictionary table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename x1 'c:\temp\class.txt';
filename x2 'c:\temp\subtitle.txt';

proc sql;
select * from dictionary.EXTFILES
where Fileref in ('X1' 'X2');
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jun 2022 04:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/815988#M322049</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-06-01T04:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to: List all the files in a folder( Ans previously ) .How to get the the date time for files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/816189#M322122</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 14:00:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-List-all-the-files-in-a-folder-Ans-previously-How-to-get/m-p/816189#M322122</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-06-02T14:00:31Z</dc:date>
    </item>
  </channel>
</rss>

