0

Alright here's one that's been stumping me way to long. You know when you right click a folder, and go to properties you get get items like the size, the type, ext. There's even options to change the icons.

What I want to know is how is this information stores? When you work with a say a file, it has a header that has information stored in side of it (like these File Signatures), however, this is a file, not a folder.

So where is this information stored? How does windows know to display a certain icon, and have it placed in a certain area, and assign it certain name, ext. I know this information must be stored somewhere, I just have no clue where.

Thanks in advance for any help

2
Contributors
2
Replies
14
Views
3 Years
Discussion Span
Last Post by JOSheaIV
1

You're talking about MS-Windows, right? You can easily get the file info in a C program (or another language) by calling win32 api function FindFirstFile() and FindNextFile(). They both fill in a structure that you pass to the functions that contains all the data.

You can rename a file by calling rename()

I don't know where the info for the icons come from, never tried to change them. But most likely it's in the registry somewhere.

0

Thanks Ancient Dragon, I'll have to look into that.

Actually I think I know where the icon data is, a db file called iconcache (located at "C:\Users\User-Name\AppData\Local\IconCache.db"). The only problem, I have no clue how to read the file. I tried using a SQLite viewer I had, no luck. Maybe I need a different viewer, but I know I have had to delete that file before when my icons start displaying incorrectly

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.