1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? age of file in seconds

Discussion in 'T&T - Scripting' started by fpefpe, Dec 12, 2015.

Tags:
  1. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    251
    Likes Received:
    1
    Hello -- I would like to test if a file is an hour or more old.

    What is the best way to test for this?

    thanks

    fpe
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,970
    Likes Received:
    30
    I don't know about "best" but (using the file's WRITE timestamp) ...
    Code:
    if %@eval[(%@makeage[%_date,%_time] - %@fileage[test.csv.txt,w]) / 10000000] gt 3600 echo It's old
     
  3. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    251
    Likes Received:
    1
    thanks -- not sure what units the time stamp was in --

    fpe
     

Share This Page