<?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: Filename pipe getting listing of all xlsx file names and modification date in linux directory in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Filename-pipe-getting-listing-of-all-xlsx-file-names-and/m-p/399646#M96816</link>
    <description>&lt;P&gt;1- The star wildcard works fine when using ls. &amp;nbsp;Linux is case-sensitive though, while Windows in not. &amp;nbsp;Could this be the reason for you troubles? &amp;nbsp;(for example, it's &amp;nbsp; &lt;FONT face="courier new,courier"&gt;&amp;nbsp;ls -R&lt;/FONT&gt; &amp;nbsp; &amp;nbsp; not &amp;nbsp; &amp;nbsp;&lt;FONT face="courier new,courier"&gt; ls -r&lt;/FONT&gt; &amp;nbsp; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2- Try to see what your input line looks like and then parse it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
filename LS pipe 'ls -R "/test/*.xlsx"' ;

data WANT; 
  format MODDATE datetime20.; 
  infile LS pad; 
  input LINE 256.;
  FNAME=substr(X,..) etc; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2017 21:12:13 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2017-09-28T21:12:13Z</dc:date>
    <item>
      <title>Filename pipe getting listing of all xlsx file names and modification date in linux directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filename-pipe-getting-listing-of-all-xlsx-file-names-and/m-p/399595#M96801</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone please help me how to get all file names and and modification date from linux directory using windows is quit simple:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename xl pipe 'dir /T:W "c:\test\*.xlsx"' &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but '*' signth for linux is not working:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename xl pipe 'ls -r "/test/*.xlsx"'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another problem is what variable names should I put in input statment to get just filename and last modification date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
 format moddate datetime20.;
 infile xl;
 input fname (?) $char50. moddate (?) 8.;
run;


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 19:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filename-pipe-getting-listing-of-all-xlsx-file-names-and/m-p/399595#M96801</guid>
      <dc:creator>Matt3</dc:creator>
      <dc:date>2017-09-28T19:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Filename pipe getting listing of all xlsx file names and modification date in linux directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filename-pipe-getting-listing-of-all-xlsx-file-names-and/m-p/399605#M96805</link>
      <description>&lt;P&gt;I don't know which wildcard to use in Linux LS command but you likely need to provide a complete path from your root (or the server) otherwise the execution is likely to be looking for a folder test in the location of the executing SAS session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are unclear where to look in the output for desired bits perhaps you should direct the output of an X command using the LS to a text file instead of a Pipe. Then you would have something to look at you could parse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you could use the SAS function DOPEN, Dread and such to read directly.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 19:52:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filename-pipe-getting-listing-of-all-xlsx-file-names-and/m-p/399605#M96805</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-09-28T19:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Filename pipe getting listing of all xlsx file names and modification date in linux directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filename-pipe-getting-listing-of-all-xlsx-file-names-and/m-p/399646#M96816</link>
      <description>&lt;P&gt;1- The star wildcard works fine when using ls. &amp;nbsp;Linux is case-sensitive though, while Windows in not. &amp;nbsp;Could this be the reason for you troubles? &amp;nbsp;(for example, it's &amp;nbsp; &lt;FONT face="courier new,courier"&gt;&amp;nbsp;ls -R&lt;/FONT&gt; &amp;nbsp; &amp;nbsp; not &amp;nbsp; &amp;nbsp;&lt;FONT face="courier new,courier"&gt; ls -r&lt;/FONT&gt; &amp;nbsp; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2- Try to see what your input line looks like and then parse it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
filename LS pipe 'ls -R "/test/*.xlsx"' ;

data WANT; 
  format MODDATE datetime20.; 
  infile LS pad; 
  input LINE 256.;
  FNAME=substr(X,..) etc; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 21:12:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filename-pipe-getting-listing-of-all-xlsx-file-names-and/m-p/399646#M96816</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-09-28T21:12:13Z</dc:date>
    </item>
  </channel>
</rss>

