How to? File Age

Oct 18, 2008
346
2
Hello -- is there a "best way" to test the age of a file? I been looking at the various "age" functions --- which for the most
part work with the NTFS 64bit timestamp value --

so, I can get this value form the file and the also the current time -- so what is the best way to reflect the difference of these
values in readable form? IE say the file is now 10 minutes old? Thanks
 
May 20, 2008
12,171
133
Syracuse, NY, USA
It depends on what you call readable. Something like this will give a number of seconds.

Code:
v:\> echo %@eval[(%@makeage[%_date,%_time] - %@fileage[file.txt]) / 10000000]
323.229

Depending on how much math you want to do, you could have just about any format you wanted.
 
Oct 18, 2008
346
2
It depends on what you call readable. Something like this will give a number of seconds.

Code:
v:\> echo %@eval[(%@makeage[%_date,%_time] - %@fileage[file.txt]) / 10000000]
323.229

Depending on how much math you want to do, you could have just about any format you wanted.

thanks for the info --- I was not sure what value to use to get the difference in seconds
 

Similar threads