@echo off setlocal enableextensions enabledelayedexpansion set sFolder="C:\Users\user\Documents\ZVIT_ARC" set /a iCount = 15 for /f "skip=%iCount% usebackq delims=" %%i in ( `dir /b /a:-d /o:-d /t:w "%sFolder%"` ) do del /f /q "%sFolder%\%%~i" endlocal exit /b 0