dokan-dev / dokan-dotnet

Dokan DotNet Wrapper
http://dokan-dev.github.io
MIT License
462 stars 116 forks source link

Folder Icon Change #338

Open MagaKhachatryan opened 1 year ago

MagaKhachatryan commented 1 year ago

Hi Dokan Support team! I would like to know if its possible to change folder icon in Dokan? I enable the desktop.ini file to be in drive, because I have removed all the if statements in the result of which dektop.ini file was impossible to upload in drive, it doesn't work. Even if I copy the folder with changed icon from other destination to drive, it appears and is shown in drive with folder default icon.

Liryna commented 1 year ago

Hi @MagaKhachatryan , yes it is possible but you must make your filesystem compliant. I don't have a link to share but indeed there is the desktop.ini and some other information you will need to return.

stroev-ao commented 7 months ago

Hi @MagaKhachatryan.

  1. In folder for that you want set icon you must return desktop.ini file as child object. It must be hidden and readonly. It's content must be like:

    [.ShellClassInfo]
    IconResource=path_to_your_icon (*.ico or *.bmp)
  2. Folder for that you want to set icon must have attribute FileAttributes.System If you still have any questions, aks, i'll try to answer.