开发者

python file was renamed, how to get 'rename time'

lets say that some开发者_如何转开发 files were renamed by Python script, is it possible to get this 'rename time' using Python (It can be seen in Far Manager)? (Windows)

It seems it is not possible through STAT, etc Any ideas ?


If you're asking how to get the modification date of the file, it's this:

>>> import os
>>> import datetime
>>> stat = os.stat('/tmp/bacon')
>>> print datetime.datetime.fromtimestamp(stat.st_mtime)
2011-03-31 08:02:52.953873


It is impossible, OS does not store such info about files. Answered by 'atzz' in comment

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜