FolderIkon

Discussion in 'PC' started by demberto, Oct 28, 2021.

  1. demberto

    demberto Rock Star

    Joined:
    Nov 27, 2018
    Messages:
    933
    Likes Received:
    328
    Applying an icon for a folder is one heck of a task on Windows. I made a little script which accepts any JPG/PNG/ICO file, converts it if needed and applies it as a folder icon. Its extremely easy to use. You just need to install Python 3.6 or higher.

    Usage/Installation instructions are given here. Works on Windows 7+, will work even on Vista maybe but idk.

    Open an issue/message me/post here if you face any problems
     
    • Interesting Interesting x 2
    • Like Like x 1
    • Useful Useful x 1
    • List
  2.  
  3. No Avenger

    No Avenger Audiosexual

    Joined:
    Jul 19, 2017
    Messages:
    9,127
    Likes Received:
    6,367
    Location:
    Europe
    With free IrfanView you can save any pic as *.ico and easily use for any folder or link. Did this change with versions above Win7?
     
    • Agree Agree x 2
    • Useful Useful x 2
    • Like Like x 1
    • Winner Winner x 1
    • List
  4. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,292
    Likes Received:
    4,028
    Location:
    Europe
    I guess since it's a script is easier to apply in batches
     
  5. No Avenger

    No Avenger Audiosexual

    Joined:
    Jul 19, 2017
    Messages:
    9,127
    Likes Received:
    6,367
    Location:
    Europe
    Batch conversion is an option in IrfanView too. Just sayin'. :winker:
     
    • Like Like x 1
    • Agree Agree x 1
    • Winner Winner x 1
    • List
  6. Olymoon

    Olymoon Moderator

    Joined:
    Jan 31, 2012
    Messages:
    5,777
    Likes Received:
    4,446
    Do you have to add any plugin to do this, or does it comes with the basic version?
     
  7. No Avenger

    No Avenger Audiosexual

    Joined:
    Jul 19, 2017
    Messages:
    9,127
    Likes Received:
    6,367
    Location:
    Europe
    If I got it right Irfanview itself is working with a bunch of plugins (probably makes the coding easier) but the ico option comes with the default version.
     
    • Like Like x 1
    • Agree Agree x 1
    • List
  8. demberto

    demberto Rock Star

    Joined:
    Nov 27, 2018
    Messages:
    933
    Likes Received:
    328
    Conversion is just a part of setting a folder icon. I didn't know irfanview could do this, but Windows needs BMP-based ICO files (there are PNG based ICO files as well, which don't work). Maybe Irfanview has support for that as well.
    As for why I am saying Windows 7+ is because I use the newer syntax for desktop.ini file which stores the name of icon. XP and below used a slightly different syntax, but nobody uses it now so I don't care.

    There are tools on GitHub which could be able to automate setting an ICO as a folder icon, there's even a shell extension I believe, but FolderIkon does it all.

    You can use URLs directly as well. Image will be downloaded, converted, resized and set as the icon.
     
    • Like Like x 1
    • Agree Agree x 1
    • List
  9. No Avenger

    No Avenger Audiosexual

    Joined:
    Jul 19, 2017
    Messages:
    9,127
    Likes Received:
    6,367
    Location:
    Europe
    Ah, good hint, I didn't know this. Then I was probably just lucky that it worked.
     
  10. DoubleTake

    DoubleTake Audiosexual

    Joined:
    Jul 16, 2017
    Messages:
    2,321
    Likes Received:
    1,242
    OK, I installed Python 3.10.
    I did not see usage /installation instructions at that link.
    I did see a list of files, but had no way to know what to do.

    I could not see anything to download but then I found under the "Code" dropdown on the right an item that says 'Download ZIP". I did download it in case it is what i need.
    I unzipped that and see the items, including the README.md

    I then figured out that I needed to open the "README.md" with notepad and read it.
    I find a section that says:
    ===========================
    ## Installation
    Requires Python 3.6+ and Windows

    ```
    pip install --upgrade folderikon
    ```
    ============================
    I don't know what that means.

    Do I need to know how to USE Python, or just to have it installed?

    I attempted to copy/paste "pip install --upgrade folderikon" into Python's windows but it gave an error about syntax:
    "SyntaxError: invalid syntax. Perhaps you forgot a comma?"
     
  11. demberto

    demberto Rock Star

    Joined:
    Nov 27, 2018
    Messages:
    933
    Likes Received:
    328
    GitHub shows code files at the top and the README below. You don't need to download anything from there, its just a place to host code

    Once you have installed Python, open an admin CMD (just to make sure you don't run into permission issues) and enter the follow as it is

    Code:
    pip install --upgrade folderikon
    That will finish in about a couple of seconds.

    Once that's done, use cd and go to the folder you want to apply the icon to.

    If you want to apply an image named Cover.jpg, you enter

    Code:
    folderikon -i Cover.jpg
    If Cover.jpg is the only image in the folder, then you can directly enter

    Code:
    folderikon
    and Folderikon will find it and apply it as folder icon.

    You can get complete usage information by entering:

    Code:
    folderikon -h
    README.md is a MarkDown file, so the ``` are for formatting code section like we use [ CODE ]. Reddit uses it for formatting too.

    You can also use a URL directly without needing to download the image yourself. Only JPG/PNG and ICO work
     
  12. demberto

    demberto Rock Star

    Joined:
    Nov 27, 2018
    Messages:
    933
    Likes Received:
    328
    No, you just need to install folderikon and use it like any other command tools like cd, dir etc
     
  13. DoubleTake

    DoubleTake Audiosexual

    Joined:
    Jul 16, 2017
    Messages:
    2,321
    Likes Received:
    1,242

    Thanks! That did it.
    I DID have Python add to my OS paths, but I did not understand that I had to install folderikon via CMD line.
    (I had opened Python and tried to install via that, which failed of course.)

    I've used command-line a fair amount but long ago and rarely have used it in recent times..but i should be able to avoid mistakes :)
    Thanks again!
     
  14. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    7,292
    Likes Received:
    4,028
    Location:
    Europe
    Yep, but (I assume) OPs script include creation of the mini-file that that you also need to put custom icons.
    Don't remember by heart but some kind folder.ini with just icon=picture.jpg inside.

    Some plugin installers put custom icons on folders. Blue Cat Audio's I think...

    Edited: just checked out the GH page. It also makes some Windows API call, probably for Windows Explorer to show immediately the icon
     
    Last edited: Oct 30, 2021
    • Like Like x 1
    • Agree Agree x 1
    • List
  15. Gizmoz

    Gizmoz Producer

    Joined:
    Oct 20, 2018
    Messages:
    134
    Likes Received:
    116
    • Like Like x 1
    • Interesting Interesting x 1
    • List
  16. GammaStar

    GammaStar Platinum Record

    Joined:
    Jul 28, 2012
    Messages:
    246
    Likes Received:
    165
    Location:
    Niburu
    • Interesting Interesting x 2
    • Useful Useful x 1
    • List
  17. demberto

    demberto Rock Star

    Joined:
    Nov 27, 2018
    Messages:
    933
    Likes Received:
    328
    Code:
    [.ShellClassInfo]
    IconResource=Icon.ico,0
    
    followed by setting that file as hidden and system and folder as readonly
    Code:
    attrib +h +s desktop.ini
    attrib +r .
     
  18. No Avenger

    No Avenger Audiosexual

    Joined:
    Jul 19, 2017
    Messages:
    9,127
    Likes Received:
    6,367
    Location:
    Europe
    Exactly. :guru: Assumption, hearsay and guesswork (as usual). :rofl:
     
  19. Guitarmaniac64

    Guitarmaniac64 Rock Star

    Joined:
    Jun 5, 2011
    Messages:
    1,345
    Likes Received:
    317
    Oh its so easy just rightclick on the folder you want to customize and have another folder icon
    And just choose propertys then choose customize and then choose change icon THREE very simple steps and that is a heck of a task? WOW:
    Of course you need an icon file prepared as windows cant handle big filesize photo files that have fileendings like JPG PNG etc. it needs to have a ICO filending.
    But converting JPG PNG etc to icon files is dead easy to do yourself just choose a program (i use any to icon) i have made thousands of folder icons with that program or just simply download icon files fron internet
    Of course there is alot of other pic to icon programs.
     
  20. DoubleTake

    DoubleTake Audiosexual

    Joined:
    Jul 16, 2017
    Messages:
    2,321
    Likes Received:
    1,242
    There are so many free icons already available, but it is fun to have your own, too.
    I was using Greenfish to make the .ico files.
     
  21. demberto

    demberto Rock Star

    Joined:
    Nov 27, 2018
    Messages:
    933
    Likes Received:
    328
    Imagine I downloaded 5 sample packs. Assume all of them have cover images in JPG format. It will take approximately 45 sec - 1 min. for applying each icon. Lets approximate that to 3-5 min. total. If I move the iconized folder elsewhere, the icon won't show up because Windows stores the absolute path regardless of the location of the icon. You must know this since you have thousands of folder icons

    If I can simply do all this with a single command in 5sec. it will be done in 25 seconds. Time saved, right?

    FOUR actually, the icon will be hidden for you and you can pass an option to delete source image which makes it FIVE, but I used your example.

    Read README on GH, I wrote it here in brief, don't like to give long lectures
     
    • Like Like x 1
    • Agree Agree x 1
    • List
Loading...