473,385 Members | 2,274 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,385 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 2254
> 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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.