<?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 get the list of file names with formats (.PDF or .DOC or .MSG) from a shared drive in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-the-list-of-file-names-with-formats-PDF-or-DOC-or-MSG/m-p/484324#M125746</link>
    <description>&lt;P&gt;If you have command line access, then you can simply:&lt;/P&gt;
&lt;PRE&gt;filename tmp pipe 'dir "..." /b';

data want;
  length name $200;
  infile tmp;
  input;
  name=_input_;
run;&lt;/PRE&gt;
&lt;P&gt;That is windows, you can do the same on other OS.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would question why you need this though?&amp;nbsp; File operations are much better done with specific tools for the task.&amp;nbsp; A simple batch file with:&lt;/P&gt;
&lt;PRE class="lang-bsh prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;dir&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;b &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; files&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;txt&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or more complicated VB script to loop etc. merged in with what ever your process is, I expect it involves copy/pasting or archiving or something like that.&amp;nbsp; SAS really isn't an OS level tool.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Aug 2018 12:03:47 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-08-06T12:03:47Z</dc:date>
    <item>
      <title>how to get the list of file names with formats (.PDF or .DOC or .MSG) from a shared drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-the-list-of-file-names-with-formats-PDF-or-DOC-or-MSG/m-p/484319#M125744</link>
      <description>&lt;P&gt;Dear team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a shared drive mapped in my networks. I am trying to get the list of file in various folders along with their formatslike whether the file is Pdf or doc or excel or an email message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Request you to kinldy let me know if it is possible. IF yes, please advise how.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 11:37:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-the-list-of-file-names-with-formats-PDF-or-DOC-or-MSG/m-p/484319#M125744</guid>
      <dc:creator>don21</dc:creator>
      <dc:date>2018-08-06T11:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the list of file names with formats (.PDF or .DOC or .MSG) from a shared drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-the-list-of-file-names-with-formats-PDF-or-DOC-or-MSG/m-p/484323#M125745</link>
      <description>&lt;P&gt;Use the dopen() and dread() functions to access directories.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 11:58:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-the-list-of-file-names-with-formats-PDF-or-DOC-or-MSG/m-p/484323#M125745</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-06T11:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the list of file names with formats (.PDF or .DOC or .MSG) from a shared drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-the-list-of-file-names-with-formats-PDF-or-DOC-or-MSG/m-p/484324#M125746</link>
      <description>&lt;P&gt;If you have command line access, then you can simply:&lt;/P&gt;
&lt;PRE&gt;filename tmp pipe 'dir "..." /b';

data want;
  length name $200;
  infile tmp;
  input;
  name=_input_;
run;&lt;/PRE&gt;
&lt;P&gt;That is windows, you can do the same on other OS.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would question why you need this though?&amp;nbsp; File operations are much better done with specific tools for the task.&amp;nbsp; A simple batch file with:&lt;/P&gt;
&lt;PRE class="lang-bsh prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;dir&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;b &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; files&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;txt&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or more complicated VB script to loop etc. merged in with what ever your process is, I expect it involves copy/pasting or archiving or something like that.&amp;nbsp; SAS really isn't an OS level tool.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 12:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-the-list-of-file-names-with-formats-PDF-or-DOC-or-MSG/m-p/484324#M125746</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-06T12:03:47Z</dc:date>
    </item>
  </channel>
</rss>

