<?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 png and html files in caslib via code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-list-png-and-html-files-in-caslib-via-code/m-p/801622#M315493</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127222"&gt;@acordes&lt;/a&gt;&amp;nbsp;you should be able to set the allFiles parameter to TRUE with the tables.fileInfo action&lt;/P&gt;</description>
    <pubDate>Fri, 11 Mar 2022 09:17:33 GMT</pubDate>
    <dc:creator>HarrySnart</dc:creator>
    <dc:date>2022-03-11T09:17:33Z</dc:date>
    <item>
      <title>how to list png and html files in caslib via code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-list-png-and-html-files-in-caslib-via-code/m-p/801347#M315374</link>
      <description>&lt;P&gt;It comes in handy to generate a proc casutil deletesource command for files in a caslib.&lt;/P&gt;
&lt;P&gt;The %sashdat or csv option works as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It works fine but I cannot "see" files of type png or html.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I achieve this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc cas;
table.caslibinfo result=sss/caslib="mkt"  ;
table.fileinfo result=sss / path="%.xlsx caslib="mkt";
saveresult sss  dataout=work.xdata;
run;

proc sql;
    select catX(" ", 'deletesource casdata=', "'"||strip(name)||"'", ' ',  "incaslib='mkt'", " quiet;") into :str
    from work.xdata
where prxmatch("m/nom|denom|kpi/oi",name) or 1=1 order by name;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I then copy/paste the reult to a proc casutil step.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc casutil;
deletesource casdata= 'ALL_DENOMINADOR2.sashdat' incaslib='mkt' quiet;
deletesource casdata= 'CARTERA_2_CHECK_REMAPPED2.sashdat' incaslib='mkt' quiet;
deletesource casdata= 'CRISTAL_BALL.xlsx' incaslib='mkt' quiet;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2022 15:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-list-png-and-html-files-in-caslib-via-code/m-p/801347#M315374</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2022-03-10T15:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to list png and html files in caslib via code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-list-png-and-html-files-in-caslib-via-code/m-p/801622#M315493</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127222"&gt;@acordes&lt;/a&gt;&amp;nbsp;you should be able to set the allFiles parameter to TRUE with the tables.fileInfo action&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 09:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-list-png-and-html-files-in-caslib-via-code/m-p/801622#M315493</guid>
      <dc:creator>HarrySnart</dc:creator>
      <dc:date>2022-03-11T09:17:33Z</dc:date>
    </item>
  </channel>
</rss>

