[DUG] File age locator function

David Moorhouse delphi at moorhouse.net.nz
Wed Jan 9 09:39:16 NZDT 2008


Hi Vikas

What exactly are you trying to do with the detection of the file age ?

The file timestamp will reflect the system time at the time the file is
saved - so obviously if the system time is changed then the timestamp on
the file will reflect that changed timestamp !

HTH

David


On Tue, 8 Jan 2008 15:37:22 +0530, you wrote:

>Hi,
>
>I have one query regarding the age of the file.
>
>well is there anyway to find which file is new one. Ok let me explain  my
>problem usign an example
>
>let say i have 2 files both same files  text1.txt  and text1.
>
>data is text1
>*************
>Delphi 5
>*************
>
>and it is genared at say 8th jan 2008 2:30 pm
>
>now i open the tex1 file again and add more lines in it
> data is text1
>*************
>Delphi 5  try Delphi 6
>*************
>
>Now the file is saved at say 8th jan 2008 3:00pm
>
>when i used FileAge function it showed file saved at  3:00pm is new
>
>
>but i faced one problem i changed my system time to 10 december 2007 and i
>added more lines in it
>
> data is text1
>*************
>Delphi 5  try Delphi 6
> try Delphi 2007
>*************
>
>Adn i saved it at 10 december 2007 4 pm
>
>now the 10 dcember file should be the altest one sicne i have just done
>canges in it
>but the file age function failed here it showed the file genrated at
>10december the old one and things went completly wrong
>
>Can any one suggets me any function or way i can track the file chnage i
>mean any way i can trace the cahnce ireespective of system time
>
>i will really apreciate your help since i am badly struck at this stage
>
>Regards
>Vikas




More information about the Delphi mailing list