Batch script to delete folders but exclude 'prep' word
<p>I'm looking for script which will remove all folders containing <em>del</em> word in the end of the name but exclude containing <em>prep</em> word.</p>

<pre><code>for /f "delims=" %%i in ('dir /a:d /s /b ?*del') do rd /s /q %%i
</code></pre>