473,545 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File Creation Time

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

Jul 21 '05 #1
3 2279
> I have a file. i get the creation time using
File.GetCreatio nTime. then i go and delete that file. and
then create it again and print the File.GetCreatio nTime.
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.GetCreatio nTime. then i go and delete that file. and then create it again and print the File.GetCreatio nTime.
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************ *************@g mx.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.publi c.dotnet.genera l
|NNTP-Posting-Host: p50909CBB.dip.t-dialin.net 80.144.156.187
|Path:
cpmsftngxa10.ph x.gbl!TK2MSFTNG XS01.phx.gbl!cp msftngxa06.phx. gbl!TK2MSFTNGP0 8
phx.gbl!tk2msft ngp13.phx.gbl
|Xref: cpmsftngxa10.ph x.gbl microsoft.publi c.dotnet.genera l:143658
|X-Tomcat-NG: microsoft.publi c.dotnet.genera l
|
|> I have a file. i get the creation time using
|> File.GetCreatio nTime. then i go and delete that file. and
|> then create it again and print the File.GetCreatio nTime.
|> 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
12404
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 creation date of the file (using python). Any idea?
2
3499
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 idea how to check a creation date it would be appreciated. Thanks dave def delete_old_files (t:\dm\~\users)
2
13186
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 fileatime(...) returns the time that a file was last accessed but what about created? Tried php.net and google, nothing =(
4
6524
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
12288
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
374
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 time itself...y is it so..?
1
2566
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? My code is creating a file correctly, but the CreationTime is (sometimes) set to the CreationTime of an old file that has previously been...
6
14386
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
5620
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 that will help me. The only function that comes close so far is os.path.getctime(path) However this only gets creation time on Windows, on...
0
7401
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7423
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4945
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1884
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
704
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.