File Creation Time

  • Thread starter Thread starter SK
  • Start date Start date
S

SK

I have a file. i get the creation time using
File.GetCreationTime. then i go and delete that file. and
then create it again and print the File.GetCreationTime.
It is giving me the old creation time itself...y is it
so..?
 
I have a file. i get the creation time using
File.GetCreationTime. then i go and delete that file. and
then create it again and print the File.GetCreationTime.
It is giving me the old creation time itself...y is it
so..?

normally not.
 
Hi,

The behaviour you see is the operating system behaviour and I belive you
can see it only for the file names less than 8.3 chars long.
In order to prevent long file name losses when old applications operate the
files using short files names (8.3), the operating system tracks
delete/create operations, and if an app creates a file with the name same
as a short name of recently deleted file, the OS assumes this is the same
file. It assigns back the long name and the creation time. Although your
application is a .Net application that supports long file names, in your
case you probably try to create a file with name not longer than 8 chars
and extension not longer than 3 chars. I.e. from OS point of view it looks
like an old file name format.

--
Victor Urnyshev [MSFT]
This post is "AS IS" with no warranties, and confers no rights.
--------------------
|From: "cody" <[email protected]>
|References: <[email protected]>
|Subject: Re: File Creation Time
|Date: Wed, 25 Aug 2004 23:51:45 +0200
|Lines: 15
|X-Priority: 3
|X-MSMail-Priority: Normal
|X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
|X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
|Message-ID: <#[email protected]>
|Newsgroups: microsoft.public.dotnet.general
|NNTP-Posting-Host: p50909CBB.dip.t-dialin.net 80.144.156.187
|Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXS01.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
phx.gbl!tk2msftngp13.phx.gbl
|Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.general:143658
|X-Tomcat-NG: microsoft.public.dotnet.general
|
|> I have a file. i get the creation time using
|> File.GetCreationTime. then i go and delete that file. and
|> then create it again and print the File.GetCreationTime.
|> It is giving me the old creation time itself...y is it
|> so..?
|
|normally not.
|
|--
|cody
|
|[Freeware, Games and Humor]
|www.deutronium.de.vu || www.deutronium.tk
|
|
|
 
Back
Top