会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
代码改变世界
Cnblogs
Dashboard
Login
Home
Contact
Gallery
Subscribe
RSS
Aquarium
Find the Way
随笔档案-2016年11月
[Python] 删除指定目录下后缀为 xxx 的过期文件
2016-11-20 21:43 by shaobin0604, 884 阅读,
收藏
,
摘要: ```Python import os import time import datetime def should_remove(path, pattern, days): if not path.endswith(pattern): return False mtime = os.path.getmtime(path) now = time.tim...
阅读全文
0 Comment
About