- @echo off&setlocal EnableDelayedExpansion
- set /p d="请输入日期(2015-05-01)"
- set d=%d:/=%
- set d=%d:-=%
- cd /d d:\统计\
- for /f "skip=1 tokens=1-6*" %%a in ('dir /a-d ^|find ":"') do (
- set t=%%a
- set t=!t:-=!
- set t=!t:/=!
- if !t! leq !d! del /q "%%d" !t!
- )
- pause
复制代码
|