Windows file creation date/time using python

前端 未结 4 861
长发绾君心
长发绾君心 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:15

    See http://docs.python.org/library/os.html#os.stat

    st_ctime (platform dependent; time of most recent metadata change on Unix, or the time of creation on Windows)

    Everything is OK.

提交回复
热议问题