<?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 can I use SAS to get the latest modification time of the file in the folder? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-SAS-to-get-the-latest-modification-time-of-the/m-p/589883#M168775</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can only use the following code to get all file names and extension types in the folder.&lt;/P&gt;&lt;P&gt;How can I get the latest modification time?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path=D:\;

data file;                                                                                                               
   length nlst nfile nnext $100;                                                                                                                     
   rc=filename('dir',"&amp;amp;path");                                                                                                                     
   dirid=dopen('dir');       
   numsel=dnum(dirid);                                                                                                                                                                                                                                                                 
   do i=1 to numsel;                                                                                                                                 
     nlst=dread(dirid,i);                                                                                                                            
     nfile=scan(nlst, 1, '.');                                                                                                                       
     nnext=upcase(scan(nlst, 2, '.'));                                                                                                               
     output;                                                                                                                                                                                                                                   
   end;                                                                                                                                                                                                                                                                                                 
   rc=dclose(dirid);                                                                                                                                 
run;  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1111.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32590i17770C352D279498/image-size/large?v=v2&amp;amp;px=999" role="button" title="1111.png" alt="1111.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2019 01:50:14 GMT</pubDate>
    <dc:creator>Lee_wan</dc:creator>
    <dc:date>2019-09-19T01:50:14Z</dc:date>
    <item>
      <title>How can I use SAS to get the latest modification time of the file in the folder?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-SAS-to-get-the-latest-modification-time-of-the/m-p/589883#M168775</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can only use the following code to get all file names and extension types in the folder.&lt;/P&gt;&lt;P&gt;How can I get the latest modification time?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path=D:\;

data file;                                                                                                               
   length nlst nfile nnext $100;                                                                                                                     
   rc=filename('dir',"&amp;amp;path");                                                                                                                     
   dirid=dopen('dir');       
   numsel=dnum(dirid);                                                                                                                                                                                                                                                                 
   do i=1 to numsel;                                                                                                                                 
     nlst=dread(dirid,i);                                                                                                                            
     nfile=scan(nlst, 1, '.');                                                                                                                       
     nnext=upcase(scan(nlst, 2, '.'));                                                                                                               
     output;                                                                                                                                                                                                                                   
   end;                                                                                                                                                                                                                                                                                                 
   rc=dclose(dirid);                                                                                                                                 
run;  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1111.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32590i17770C352D279498/image-size/large?v=v2&amp;amp;px=999" role="button" title="1111.png" alt="1111.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 01:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-SAS-to-get-the-latest-modification-time-of-the/m-p/589883#M168775</guid>
      <dc:creator>Lee_wan</dc:creator>
      <dc:date>2019-09-19T01:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use SAS to get the latest modification time of the file in the folder?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-SAS-to-get-the-latest-modification-time-of-the/m-p/589895#M168784</link>
      <description>&lt;P&gt;Have you looked at function FINFO?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 02:59:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-SAS-to-get-the-latest-modification-time-of-the/m-p/589895#M168784</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-09-19T02:59:48Z</dc:date>
    </item>
  </channel>
</rss>

