![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-13 00:41 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » Asking for "a bat for regularly cleaning folders" (waiting for the 2nd day) |
| Printable Version 2,890 / 16 |
| Floor16 sj2009 | Posted 2009-12-17 11:47 |
| 新手上路 Posts 10 Credits 10 | |
|
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 |
|
| Floor17 Hanyeguxing | Posted 2009-12-17 12:45 |
| 银牌会员 Posts 897 Credits 1,039 From 在地狱中仰望天堂 | |
|
"The "d:\视频 recording materials" is the directory to be checked. The time point is set to September 2, 2010, 15:01. Use this to test. Does the list not display all the files in this folder? Please post the displayed results as a picture. Specifically, why doesn't it work? [ Last edited by Hanyeguxing on 2009-12-17 at 12:56 ] |
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |