4,901 Posted Topics

Member Avatar for PythonNewbie2

The following function will return true if the given file is <= numsecs old. Just convert 3 hours to seconds and pass as an argument. [CODE] import os import time def newFile(file,numsecs): if time.time() - os.path.getctime(file) <= numsecs: return True else: return False [/CODE]

Member Avatar for Reverend Jim
0
289

The End.