<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169030</link>
    <title>MATLAB Central Newsreader - How to execute all the matlab file under a directory?</title>
    <description>Feed for thread: How to execute all the matlab file under a directory?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 10 May 2008 02:13:59 -0400</pubDate>
      <title>How to execute all the matlab file under a directory?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169030#431317</link>
      <author>zhengquan</author>
      <description>Hello,&lt;br&gt;
&lt;br&gt;
I have a directory with lots of subdirectories,	in the&lt;br&gt;
subdirectories, there are the same scripts to anylyse data&lt;br&gt;
stored in them. Now I want to traverse the entire directory&lt;br&gt;
and get the matlab scripts executed in all the&lt;br&gt;
subdirectories. I am running a linux system. Can anyone tell&lt;br&gt;
me how to do that?  Thanks!&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
Zhengquan&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sat, 10 May 2008 11:50:18 -0400</pubDate>
      <title>Re: How to execute all the matlab file under a directory?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169030#431348</link>
      <author>carlos lopez</author>
      <description>zhengquan &amp;lt;zhang.zhengquan@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;98432fb4-2bd1-4390-bfeb-782fcd0f4a3b@m36g2000hse.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have a directory with lots of subdirectories,	in the&lt;br&gt;
&amp;gt; subdirectories, there are the same scripts to anylyse data&lt;br&gt;
&amp;gt; stored in them. Now I want to traverse the entire directory&lt;br&gt;
&amp;gt; and get the matlab scripts executed in all the&lt;br&gt;
&amp;gt; subdirectories. I am running a linux system. Can anyone tell&lt;br&gt;
&amp;gt; me how to do that?  Thanks!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Regards,&lt;br&gt;
&amp;gt; Zhengquan&lt;br&gt;
In order to locate all the files with a given sufix, in&lt;br&gt;
linux you can issue the following command in the top directory:&lt;br&gt;
&lt;br&gt;
find . -name "*.m" -print&lt;br&gt;
If you want to do this from within matlab, you can resort to&lt;br&gt;
the unix command:&lt;br&gt;
unix('find . -name "*.m" -print')&lt;br&gt;
but I cannot assure how you get the output, etc.&lt;br&gt;
Regards&lt;br&gt;
Carlos&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sat, 10 May 2008 12:32:03 -0400</pubDate>
      <title>Re: How to execute all the matlab file under a directory?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169030#431349</link>
      <author>John D'Errico</author>
      <description>"carlos lopez" &amp;lt;clv2clv_00000000_@adinet.com.uy&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g0425q$8d7$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; zhengquan &amp;lt;zhang.zhengquan@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;98432fb4-2bd1-4390-bfeb-&lt;br&gt;
782fcd0f4a3b@m36g2000hse.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hello,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I have a directory with lots of subdirectories,	in the&lt;br&gt;
&amp;gt; &amp;gt; subdirectories, there are the same scripts to anylyse data&lt;br&gt;
&amp;gt; &amp;gt; stored in them. Now I want to traverse the entire directory&lt;br&gt;
&amp;gt; &amp;gt; and get the matlab scripts executed in all the&lt;br&gt;
&amp;gt; &amp;gt; subdirectories. I am running a linux system. Can anyone tell&lt;br&gt;
&amp;gt; &amp;gt; me how to do that?  Thanks!&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Regards,&lt;br&gt;
&amp;gt; &amp;gt; Zhengquan&lt;br&gt;
&amp;gt; In order to locate all the files with a given sufix, in&lt;br&gt;
&amp;gt; linux you can issue the following command in the top directory:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; find . -name "*.m" -print&lt;br&gt;
&amp;gt; If you want to do this from within matlab, you can resort to&lt;br&gt;
&amp;gt; the unix command:&lt;br&gt;
&amp;gt; unix('find . -name "*.m" -print')&lt;br&gt;
&amp;gt; but I cannot assure how you get the output, etc.&lt;br&gt;
&amp;gt; Regards&lt;br&gt;
&amp;gt; Carlos&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Its far easier to do in matlab. dir will do what&lt;br&gt;
the OP wants. However, if you want to look&lt;br&gt;
recursively through the deeper directories,&lt;br&gt;
then you will want to use a tool that supports&lt;br&gt;
such a search. There are many of them on the&lt;br&gt;
file exchange. Just pick one out.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.mathworks.com/matlabcentral/fileexchange/loadCategory.do?"&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadCategory.do?&lt;/a&gt;&lt;br&gt;
objectId=38&amp;objectType=Category&lt;br&gt;
&lt;br&gt;
John&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
