snipt

Ctrl+h for KB shortcuts

Batchfile

Run all files in current folder bat file

1
2
3
:: Run all files in current folder
:: No spaces in files' names! (Except this bat file name - so it won't start files forever in recursion)
for /r %%i in (*) do start %%i
https://snipt.net/embed/8ab47e79080e32d0f41c876afdd02bc8/
/raw/8ab47e79080e32d0f41c876afdd02bc8/
8ab47e79080e32d0f41c876afdd02bc8
bat
Batchfile
3
2019-07-14T02:24:14
True
False
False
Feb 12, 2013 at 01:25 PM
/api/public/snipt/53825/
run-all-files-in-current-folder-bat-file
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">:</span><span class="c1">: Run all files in current folder</span> </span><span id="L-2"><a name="L-2"></a><span class="p">:</span><span class="c1">: No spaces in files&#39; names! (Except this bat file name - so it won&#39;t start files forever in recursion)</span> </span><span id="L-3"><a name="L-3"></a><span class="k">for</span> /r <span class="se">%%</span>i <span class="k">in</span> <span class="p">(</span>*<span class="p">)</span> <span class="k">do</span> <span class="k">start</span> <span class="se">%%</span>i </span></pre></div> </td></tr></table>
batch, file