<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Way to find out if some file exists in certain folder?]]></title><description><![CDATA[<p>Hi, my patch reads up to thousands of text files on loadbang.</p>
<p>But since there could be some files that hasn't been created yet, so pd prints &quot;can't open XXX.txt, read failed&quot; and it gets really slow doing this.</p>
<p>So I would like to firstly check if the file exists in the folder, so I don't have to read missing files.</p>
<p>Is there anyway to find out the list of files? or if some file exists in the folder? by using relative path?</p>
<p>Thank you in advance!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 07:09:25 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/8316.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 May 2014 08:58:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Way to find out if some file exists in certain folder? on Sun, 04 May 2014 08:58:36 GMT]]></title><description><![CDATA[<p>Hi, my patch reads up to thousands of text files on loadbang.</p>
<p>But since there could be some files that hasn't been created yet, so pd prints &quot;can't open XXX.txt, read failed&quot; and it gets really slow doing this.</p>
<p>So I would like to firstly check if the file exists in the folder, so I don't have to read missing files.</p>
<p>Is there anyway to find out the list of files? or if some file exists in the folder? by using relative path?</p>
<p>Thank you in advance!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder</guid><dc:creator><![CDATA[cuinjune]]></dc:creator><pubDate>Sun, 04 May 2014 08:58:36 GMT</pubDate></item><item><title><![CDATA[Reply to Way to find out if some file exists in certain folder? on Sun, 04 May 2014 11:09:51 GMT]]></title><description><![CDATA[<p>You could try using [folder_list] from hcs to compile a list of the files that exist, then read them from that list.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/2</guid><dc:creator><![CDATA[James]]></dc:creator><pubDate>Sun, 04 May 2014 11:09:51 GMT</pubDate></item><item><title><![CDATA[Reply to Way to find out if some file exists in certain folder? on Sun, 04 May 2014 12:07:29 GMT]]></title><description><![CDATA[<p>I was hoping to find a solution that works in vanilla but thanks!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/3</guid><dc:creator><![CDATA[cuinjune]]></dc:creator><pubDate>Sun, 04 May 2014 12:07:29 GMT</pubDate></item><item><title><![CDATA[Reply to Way to find out if some file exists in certain folder? on Fri, 23 Jan 2015 21:40:42 GMT]]></title><description><![CDATA[<p>I know this is old topic, but if someone still wants this abstraction, here is my vanilla attempt:<br />
<a href="/uploads/files/upload-b61c6f28-8507-4599-a9af-0cf731bc7582.pd">file-exists.pd</a><br />
<a href="/uploads/files/upload-e26d8cea-6fcf-4475-ba40-b478a8f33187.pd">file-exists-help.pd</a><br />
the only annoying thing is the error message in console when file not found <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/frowning.png" title=":-(" alt=":-(" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/4</guid><dc:creator><![CDATA[xbarbie]]></dc:creator><pubDate>Fri, 23 Jan 2015 21:40:42 GMT</pubDate></item><item><title><![CDATA[Reply to Way to find out if some file exists in certain folder? on Sat, 24 Jan 2015 08:46:46 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/xbarbie">@xbarbie</a> Hi. I don't currently need to read several files, although I might, in the future. If you are in <strong>extended</strong>, you can clear the console automatically after the patch has loaded using...</p>
<pre><code>[menu_clear_console(
|
[hcs/sys_gui]
</code></pre>
<p>I also uploaded a humble abstraction for that which will do the job for you automatically if you just paste it in the patch. It's here: <a href="http://forum.pdpatchrepo.info/topic/8808/clearconsole-a-button-for-compulsive-console-cleaners">http://forum.pdpatchrepo.info/topic/8808/clearconsole-a-button-for-compulsive-console-cleaners</a></p>
<p>But if you are in <strong>vanilla</strong>, I guess you can achieve almost the same by automatically (loadbang) printing a line, or sthg that you like, as a separator. You could even print a &quot;Problem solved&quot; message. I posted about this at...<br />
<a href="http://forum.pdpatchrepo.info/topic/8326/clear-console-window-in-pd-extended/5">http://forum.pdpatchrepo.info/topic/8326/clear-console-window-in-pd-extended/5</a></p>
<p>Have a nice day! And thanks for sharing your code.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/5</guid><dc:creator><![CDATA[LandonPD]]></dc:creator><pubDate>Sat, 24 Jan 2015 08:46:46 GMT</pubDate></item><item><title><![CDATA[Reply to Way to find out if some file exists in certain folder? on Sat, 24 Jan 2015 08:58:52 GMT]]></title><description><![CDATA[<p>Maybe you'll want to set a [del #], so that your line, or message, always appears <em>after</em> any annoying error message.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/6</guid><dc:creator><![CDATA[LandonPD]]></dc:creator><pubDate>Sat, 24 Jan 2015 08:58:52 GMT</pubDate></item><item><title><![CDATA[Reply to Way to find out if some file exists in certain folder? on Sat, 24 Jan 2015 10:24:27 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/landonpd">@LandonPD</a> Thanks, I was thinking about clearing the console, but I left it as it is, because it is not solving the problem, only hiding it. Not because it is extended (even when I try to keep my abstraction as vanilla as possible), but mainly, IMHO, it's not fair behaviour for one object to clear <strong>all</strong> messages from the others...<br />
But maybe printing some message is the best way to get over current state (to inform user that he can ignore previous error messages). Once again thank you for idea.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/7</guid><dc:creator><![CDATA[xbarbie]]></dc:creator><pubDate>Sat, 24 Jan 2015 10:24:27 GMT</pubDate></item><item><title><![CDATA[Reply to Way to find out if some file exists in certain folder? on Sat, 24 Jan 2015 16:27:43 GMT]]></title><description><![CDATA[<p>Maybe.</p>
<p>And maybe you want to upload that program to the abstraction or subpatch sections? If it does the job right, it deserves more visibility and its own thread.</p>
<p>Cordially, Landon</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/8</guid><dc:creator><![CDATA[LandonPD]]></dc:creator><pubDate>Sat, 24 Jan 2015 16:27:43 GMT</pubDate></item><item><title><![CDATA[Reply to Way to find out if some file exists in certain folder? on Sun, 06 Dec 2020 16:35:55 GMT]]></title><description><![CDATA[<p>I have used <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/xbarbie">@xbarbie</a>'s solution for years and while it works perfectly for text files it does not work well with larger audio files on my raspberry pi. If you have hcs available and you want a different solution I have this abstraction that takes symbol input and outputs a 1 or 0 just like <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/xbarbie">@xbarbie</a>'s. Relative paths work as well.</p>
<p><a href="/uploads/files/1607272538898-file-exists.pd">file-exists.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/8316/way-to-find-out-if-some-file-exists-in-certain-folder/9</guid><dc:creator><![CDATA[patchworks]]></dc:creator><pubDate>Sun, 06 Dec 2020 16:35:55 GMT</pubDate></item></channel></rss>