Windows file creation date/time using python

前端 未结 4 847
长发绾君心
长发绾君心 2020-12-21 13:29

I need to get a file creation date&time using python. I tried:

os.stat(r\"path\")[ST_CTIME]

But it is returning:

126353         


        
4条回答
  •  生来不讨喜
    2020-12-21 14:10

    Why not?

    >>> import time
    >>> time.ctime(1263538277)
    'Fri Jan 15 04:51:17 2010'
    

    Looks like a valid creation time to me.

提交回复
热议问题