After researching for a long time, it still doesn't work.
If you only delete files before a certain point in time, you can write it like this:
CODE: [Copy to clipboard]
--------------------------------------------------------------------------------
for /f "skip=5 tokens=1,2,3,4,5,7* delims=-:/ " %%i in ('dir "路径" /a:-d /t:c') do if not "%%m" == "" if "%%i%%j%%k%%l%%m" lss "时间" @del "路径\%%n%%o" /a /f /q>nul 2>nul
If you only delete files before a certain point in time, you can write it like this:
CODE: [Copy to clipboard]
--------------------------------------------------------------------------------
for /f "skip=5 tokens=1,2,3,4,5,7* delims=-:/ " %%i in ('dir "路径" /a:-d /t:c') do if not "%%m" == "" if "%%i%%j%%k%%l%%m" lss "时间" @del "路径\%%n%%o" /a /f /q>nul 2>nul


