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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting properties on a file, eg Author, owner etc

Status
Not open for further replies.

LucieLastic

Programmer
May 9, 2001
1,694
0
0
GB
hi All

I'd like to set the following properties on a file, is it easy to do? Does anyone have a simple example I could steal? I need to get it done quickly and I haven't, as yet, found a relevant example on the net.

LastModified Datetime
DateCreation Datetime
Author
Owner
Comments

Many thanks in advance
Lou
 
You have to get familiar with this stuff in order to do what you're talking about:


Of course much on whether it is "easy to do" involves whether there is a type library for these definitions and you are willing to convert some things. It might be in newer versions of Delphi, though.

Though it may not be as hard as it first appears, either:


It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
 
I'd be willing to bet that the JCL/JVCL has routines for that, too.
 
Just out of instinct, I don't think it's possible to modify the created/modified date of files - this is automatic in Windows. I could be wrong though.

JD Solutions
 
I don't think it's possible to modify the created/modified date of files

Just to clarify, the OP is talking about the "Summary" tab that exists on the Explorer File Properties window for NTFS volumes. Anything that is in the "General" tab, however may be modified by most of the general Delphi routines as well as the basic Win32 API calls.

Using GetFileTime and SetFileTime will accomplish the quoted task.

It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top