PDA

View Full Version : Finding a directory's creation date in Python...impossible?



Tadpole
July 21st, 2008, 07:18 AM
I tried using Python's os.stat (http://docs.python.org/lib/os-file-dir.html), st_ctime in particular, but as the documentation states it only shows creation date in Windows -- on *nix, it only shows the last metadata modification date. I also tried st_birthtime, but that doesn't work in Linux.

Anyone have another suggestion for getting a directory's creation date?

ghostdog74
July 21st, 2008, 07:42 AM
you can use os.path.getmtime()