Customised Folder

Windows specific forum
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Customised Folder

Post by IdeasVacuum »

In Windows, the User can replace the default folder icon (of an individual folder) with a custom image. Can we do that programmatically?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Customised Folder

Post by Fangbeast »

IdeasVacuum wrote:In Windows, the User can replace the default folder icon (of an individual folder) with a custom image. Can we do that programmatically?
Have a look at the system file "Desktop.ini" that might be in a directory. It usually appears when a folder has been customised.

I manually changed a folder icon to see what would happen and it looks like this:

Code: Select all

[LocalizedFileNames]
_AddAddressPhoto.pbi=@_AddAddressPhoto.pbi,0
[.ShellClassInfo]
IconResource=D:\bangf\Development\Dev-Current\BFC\Images\book.ico,0
[ViewState]
Mode=
Vid=
FolderType=Generic
Before I changed it, all that file had in it was: (A reference to one of my codes)

Code: Select all

[LocalizedFileNames]
_AddAddressPhoto.pbi=@_AddAddressPhoto.pbi,0
PB seems to be able to see system files so you might be able to open the file given appropriate permission and edit it. Now you just need to find a full list of what goes in there and try it out.

This reference may help:

https://www.thewindowsclub.com/desktop-ini-file-windows
Amateur Radio, D-STAR/VK3HAF
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Customised Folder

Post by IdeasVacuum »

Thanks Fangbeast, really good detective work. Actually, if I customise a folder on my PC, I can experiment by copying the resultant .ini and see what happens if I just place it into a different folder :D

Edit: https://www.thewindowsclub.com/desktop-ini-file-windows

That's a very nice site, a good description of the Desktop.ini file.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Customised Folder

Post by Fangbeast »

Thanks Fangbeast, really good detective work.
Just call me Shylock Bones:):)
Amateur Radio, D-STAR/VK3HAF
Post Reply