<div dir="ltr"><div>You'll also need to convert the loop index to a string with fromint(i) or sprintf("%i", i) or similar.<br><br></div><div>It's probably better and less error-prone in general to ensure that any functions that create their output files also create the directory. App functions should already do this (if they don't, it's a bug).<br>
</div><div><br></div> - Tim<br><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 30, 2014 at 9:52 AM, Justin M Wozniak <span dir="ltr"><<a href="mailto:wozniak@mcs.anl.gov" target="_blank">wozniak@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div><br>
Yes but do it like this: <br><div class="">
<br>
<div>foreach i in [0:99]{</div>
</div><div> create_dir("dir"+i) =><br>
</div><div class="">
<div> do_some_op(inargs, "dir"+i+"/"+outfile);</div>
<div>}</div>
<div><br>
</div>
<br>
<br></div><div><div class="h5">
On 07/30/2014 09:50 AM, Ketan Maheshwari wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">In T, is it possible to create directory on the fly
within a foreach loop like so:
<div><br>
</div>
<div>foreach i in [0:99]{</div>
<div> create_dir("dir"+i);</div>
<div> do_some_op(inargs, "dir"+i+"/"+outfile);</div>
<div>}</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Ketan</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
ExM-user mailing list
<a href="mailto:ExM-user@lists.mcs.anl.gov" target="_blank">ExM-user@lists.mcs.anl.gov</a>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/exm-user" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/exm-user</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
<pre cols="72">--
Justin M Wozniak</pre>
</font></span></div>
<br>_______________________________________________<br>
ExM-user mailing list<br>
<a href="mailto:ExM-user@lists.mcs.anl.gov">ExM-user@lists.mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/exm-user" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/exm-user</a><br>
<br></blockquote></div><br></div></div></div>