473,320 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

File Creation Time

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..?

Jul 21 '05 #1
3 2247
> 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
Jul 21 '05 #2
sk
it would be better if u try it out and give an answer.

-----Original Message-----
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
.

Jul 21 '05 #3
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" <pl*************************@gmx.de>
|References: <cd****************************@phx.gbl>
|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: <#T**************@tk2msftngp13.phx.gbl>
|Newsgroups: microsoft.public.dotnet.general
|NNTP-Posting-Host: p50909CBB.dip.t-dialin.net 80.144.156.187
|Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXS01.phx.gbl!cpmsftn gxa06.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
|
|
|

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: [ EuGeNe ] | last post by:
Hi all, I would like to write a script that downloads one file from a ftp server if the file creation date satisfy a condition. I can't figure out how to find from a ftp server what is the...
2
by: David Fickbohm | last post by:
People, I am trying to determine the creation date of files in a folder. I am using the following code to find the folder and confirm that files exist in the folder. If someone could give me an...
2
by: Robizzle | last post by:
Sorry, I must be blind but I can't seem to find it anywhere. What function will return the time a file was created? I see filemtime(...) returns the time that file was last Modified and...
4
by: wil | last post by:
Dear All, In the linux platform, is there anyway I can in a C program change the file create date? Thanks, wil.
8
by: Eddie Suey | last post by:
I want to add a new line to the begining of a text file. I dont want to write over existing data. How do I do this? the file is about 7 mb.
4
by: SK | last post by:
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...
1
by: Tim Failes | last post by:
This seems a trival question, but I cannot get it to work properly... Essentially my question is, how can I create a text file, and guarantee it is given the current date/time as the Creation Time?...
6
by: KoRnDragon | last post by:
I know about getlastmod() but is there one for created date? If not is there some other way of getting the created date of a file?
4
by: Carl J. Van Arsdall | last post by:
I've been looking around the OS module and I haven't found anything useful yet. Does anyone know how to get the age of a file or directory in days? I'm using unix and don't seem to find anything...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.