more file info than in Tsearchrec

Please discuss general Delphi programming topics here.

more file info than in Tsearchrec

Postby Marmar » April 22nd, 2007, 12:07 am

Does anybody know if it is possible to find out more info about file than this in Tsearchrec given by functions findfirst, findnext? For example information about the progam which has created or opened this file?
Marmar
Active Member
Active Member
 
Posts: 9
Joined: March 21st, 2007, 3:24 am
Location: Warsaw, Poland

Postby Johnny_Bit » April 22nd, 2007, 7:50 am

c'est impossible. Using FAT or NTFS, no such informations are stored, therefore it's not possible.

Or maybe you asked the wrong question?
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Kambiz » April 22nd, 2007, 8:28 am

What do you mean about more information? If you tell what, maybe we can offer a solution.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby Marmar » April 22nd, 2007, 12:45 pm

As I've written. 1.Where does the file come from- who (what application) create this file. 2 Who opened/changed it last time.
Marmar
Active Member
Active Member
 
Posts: 9
Joined: March 21st, 2007, 3:24 am
Location: Warsaw, Poland

Postby Johnny_Bit » April 22nd, 2007, 1:29 pm

As I said, I believe that this kind of information is not stored niether in FAT nor NTFS.

Frankly, when I had classes for Hardware systems, there was one subject that was related to your question: we had to theoretically design some kind of file system and what information should be stored in it. Nobode even thought about "program that created the file" field. So... I'm preety sure there is no FS that has this kind of data.

On the other hand... There are ways to get not stored info... What approach you want to take?
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Kambiz » April 22nd, 2007, 4:05 pm

You may find the ower user who created a file, but about the rest I don't think so.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby Johnny_Bit » April 22nd, 2007, 6:43 pm

as far as I know from FAT you can get only: name, creation date& time, same to last modification and file size. that's all. Now from NTFS you can(IF you get the specs) get all info that any normal FS should have.
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Marmar » April 22nd, 2007, 9:03 pm

Ok, thanks for the answers. I expected so, and now I'm more sure that there is no possibility to find out more than Tsearchrec gives.
BTW Tsearchrec differs date/time between creation and last modification of file.
Marmar
Active Member
Active Member
 
Posts: 9
Joined: March 21st, 2007, 3:24 am
Location: Warsaw, Poland

Postby DwrCymru » April 27th, 2007, 6:42 pm

To actually get more info than the standard TSearchRec you should have a look at the "TWin32FindData" pointer returned in the record. It won't provide all the information you are looking for, and if the user has selected not to record some of the information then it's a bit useless but it can give last access and other interesting stuff (well if you are that way inclined :lol:).

For more info have a look at :

http://www.jpgriffiths.com/tutorial/api/findfirstfile.html
DwrCymru
Active Member
Active Member
 
Posts: 8
Joined: April 27th, 2007, 11:02 am


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron