Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file creation time / modified time / last access time

Status
Not open for further replies.

inetd

Technical User
Jan 23, 2002
115
HK
How can I get and set the creation time /modified time / last access time of a file?

I have done using GetFileTime() and SetFileTime() in Delphi.
However I can't do it in BCB since GetFileTime() return error.


Thanks.
 
Look at the FileGetDate() and FileDateToDateTime() functions. There are also some MFC classes you can use, too. James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
Thanks 2ffat, I had already solved the problem.
I had made little mistake on GetFileTime() function call because I was confused by the return value type of FileOpen() and the file handle parameter of GetFileTime().

Anyway, thank you very much.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top