@echo offsetlocal enabledelayedexpansionset /p rq=请按这个格式输入日期%date:~0,10%for /f "tokens=*" %%i in ('dir/b *.txt') do (set fn=%%iset fn=!fn:~0,10!if !fn!==%rq% del "%%i")