Page 1 of 1
Customised Folder
Posted: Thu Feb 25, 2021 12:55 pm
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?
Re: Customised Folder
Posted: Thu Feb 25, 2021 1:12 pm
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
Re: Customised Folder
Posted: Thu Feb 25, 2021 1:37 pm
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
Edit: https://www.thewindowsclub.com/desktop-ini-file-windows
That's a very nice site, a good description of the Desktop.ini file.
Re: Customised Folder
Posted: Fri Feb 26, 2021 12:17 am
by Fangbeast
Thanks Fangbeast, really good detective work.
Just call me Shylock Bones:):)