<?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 Delete files in a folder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Delete-files-in-a-folder/m-p/46864#M26698</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to delte all .txt,.csv,.jrn and .png files in a folder before running a script to repopulate everything?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do want to keep my. json file in the same folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much. I really appreciate your time and effort.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2017 19:50:12 GMT</pubDate>
    <dc:creator>vishwasanj</dc:creator>
    <dc:date>2017-11-07T19:50:12Z</dc:date>
    <item>
      <title>Delete files in a folder</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-files-in-a-folder/m-p/46864#M26698</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to delte all .txt,.csv,.jrn and .png files in a folder before running a script to repopulate everything?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do want to keep my. json file in the same folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much. I really appreciate your time and effort.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 19:50:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-files-in-a-folder/m-p/46864#M26698</guid>
      <dc:creator>vishwasanj</dc:creator>
      <dc:date>2017-11-07T19:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delete files in a folder</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-files-in-a-folder/m-p/46867#M26700</link>
      <description>&lt;P&gt;You can use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Y = Files In Directory( &amp;lt;Path"=&amp;gt; );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to get the files, and then loop through the list of files and determine if the file is of the type you want to delete, and then delete it&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(word(=1,Y[i],".") == "txt",
    r= Delete File(&amp;lt;path&amp;gt; || Y[i]);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Nov 2017 19:58:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-files-in-a-folder/m-p/46867#M26700</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-11-07T19:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Delete files in a folder</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-files-in-a-folder/m-p/46869#M26701</link>
      <description>Is there a way to count from the left as I have "." in the name also?</description>
      <pubDate>Tue, 07 Nov 2017 20:24:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-files-in-a-folder/m-p/46869#M26701</guid>
      <dc:creator>vishwasanj</dc:creator>
      <dc:date>2017-11-07T20:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Delete files in a folder</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-files-in-a-folder/m-p/46870#M26702</link>
      <description>&lt;P&gt;Oops, the word() functions reference should have been&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(word(-1,Y[i],".") == "txt"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;negative values indicate to count from the right, positive values count from the left&lt;/P&gt;
&lt;P&gt;Go to&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Scripting Index==Functions==&amp;gt;Character==&amp;gt;Word&lt;/P&gt;
&lt;P&gt;for documentation and example&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 20:34:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-files-in-a-folder/m-p/46870#M26702</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-11-07T20:34:40Z</dc:date>
    </item>
  </channel>
</rss>

