CODE: [Copy to clipboard]@echo off for /f "delims=" %%a in ('dir /s /a:-d /b "H:\yourphoto" ^| findstr /v .print.jpg') do del /q "%%a"