4,901 Posted Topics
Re: 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] |
The End.