Question

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 ?

Was it helpful?

Solution 2

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

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top