Determining difference in time of a file

(imported topic written by SystemAdmin)

Hello,

I have a file that has a modification time that changes often and would like to compare the timestamp of the file to the current timestamp of now.

Here is my relevance in basic terms:

if exist “/tmp/mytestfile” and (current_time - timestamp_of_mytestfile) < 300 secs then true else false

Thanks much,

(imported comment written by BenKus)

How about this:

(now - modification time of file “/temp/mytestfile”) < 300*second

Ben

(imported comment written by SystemAdmin)

Wow Ben…had no idea it could be this simple…works great!

Thanks a lot,