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

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.