#!/usr/bin/python # -*- coding: utf-8 -*- import os,datetime crd = os.getcwd() files = os.listdir(crd) for fi in files: mt = os.stat(os.path.abspath(fi)).st_mtime d_mt = datetime.datetime.fromtimestamp(mt) print d_mt.strftime(‘%Y-%m-%d %H:%M:%S‘)[0:10]
时间: 2024-10-05 14:08:17