Re: Wrong Creation Date for Files
From: mikeb (mailbox.google_at_nospam.mailnull.com)
Date: 06/22/04
- Next message: John Wood: "Re: Keeping control centered"
- Previous message: Simon Smith: "Re: Why single inheritance??"
- In reply to: Steven Blair: "Wrong Creation Date for Files"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 22 Jun 2004 08:31:32 -0700
Steven Blair wrote:
> Hi,
>
> I have a trace log file for a system I am writing. If the creation date
> is older than 14 days, I have to rename that file (File.Move). The next
> time a trace message is required a new file is created
>
> StreamWriter sw = new StreamWriter(path,true);
>
> The problem is, the creation date of this new file has the creation date
> of the previous log file :S and not the present date.
>
> I used a freeware app to change the creation date of the original file.
>
> The new file definately does not exists before creation (File.Exist is
> used)
>
This is due to a feature of the operating system, called tunneling, to
support applications that create file backups by renaming a file (for
example to *.bak), then create a new file with the original name or some
similar variation on that theme. This way the filesystem maintains the
original file's 'state' in the new file (which *is* the original file
as far as the user is concerned).
See KB172190 for more information:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B172190
-- mikeb
- Next message: John Wood: "Re: Keeping control centered"
- Previous message: Simon Smith: "Re: Why single inheritance??"
- In reply to: Steven Blair: "Wrong Creation Date for Files"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|