@echo off forfiles /p "E:\data" /s /m *.JPG /d -220 /c "cmd /c echo deleting @file ... && del /f @path" @echo on