Determining last time a file was accessed
John Abel
john.abel at pa.press.net
Tue Feb 4 09:44:43 EST 2003
Hi,
os.stat and st_atime should do the job.
Regards
John
Peter Markowsky wrote:
>Hi all,
>
>Basically my problem is that while working on a script to do inventory
>of files at work, I noticed that some files were over two years old
>and that I shouldn't even consider these for my inventory unless
>they've been accessed recently. So what I would like to know is there
>a way to determine the last time a file has been accessed using
>python? I'm currently writing this script for windows but would like
>to keep the script as platform independent since I get the impression
>I'll need to run it on solaris later.
>
>Thanks,
>
>Pete
>
More information about the Python-list
mailing list