 <p>So you just want to exclude files containing <code>backup</code> in their names? This should work:</p> <pre><code>@echo off setlocal enabledelayedexpansion for /r "C:\Users\b00m49\Desktop\LSPTEST" %%a in (K_E*.dwg) do ( set filename=%%a if "!filename:backup=!"=="!filename!" ( rem start /wait "C:\Program Files\Autodesk\Autocad 2013\acad.exe" "%%a" /b "C:\Users\b00m49\Desktop\LSPTEST\expSQM.scr" ) ) pause </code></pre>