topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday December 10, 2024, 11:32 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: AppFolderIcon - Sets icon from .exe files on their containing folder (v0.2.0)  (Read 6255 times)

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 736
  • Call me Vic!
    • View Profile
    • Donate to Member
AppFolderIcon
Sets icon from .exe files on their containing folder.

download-button.png





Made for kunkel321 from donationcoder.com.

Original thread: IDEA: Pull icon from exe and put on the containing folder

Source code: AppFolderIcon @ GitHub

Targets Microsoft .NET framework v4.5 (Native to Windows 8+)

Notes:

v0.2.0
  • Instant application of changes.
  • New icon selection form.
  • Restore icon via API call.
  • Ratcliff/Obershelp as algorithm.
  • Works on top folders only.
Day #177, Week #25 @ June 26, 2021

v0.1.0:
  • Set folder icon for subdirectories.
  • Delete desktop.ini file recursively.
  • Always on top.
Day #45, Week #06 @ February 14, 2021

==========


RELEASE SPONSORS:
  • Jesse Reichler (A.K.A. Mouser from DonationCoder.com)
  • Kunkel321
  • Your name here? :)
You may support this project by expressing your excitement in the form of a Donation via DonationCredits, Paypal @ www.paypal.me/victorvls or by becoming a Patron @ www.patreon.com/publicdomain.

Thanks & keep on rocking!

==========

Enjoy more weekly releases on the 1st, 7th, 14th and 21st @ https://publicdomainweekly.com
My name's Victor but do feel free to call me Vic! (now known as "paradisusvic")

❤️ Support on Patreon @ www.patreon.com/paradisusis
New Email/Paypal: paradisusvicgmail.com
« Last Edit: June 26, 2021, 05:04 PM by publicdomain »

kunkel321

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 602
    • View Profile
    • Donate to Member
Re: AppFolderIcon thread
« Reply #1 on: February 15, 2021, 05:36 PM »
Man this is awesome!  I have a back-up of my Portable Apps folder.  31 first level subfolders, but if you dig to the bottom of each directory, there are 333 of them.  It takes the AppFolderIcon between 2-3 seconds to process them.  Pretty good.  The algorithm does guess the names pretty good, but there are a couple of surprising misfires of the Levenshtein_distance math.  Do you want me to post them for fine-tuning purposes, or is this that can't really be adjusted anyway?

Also, what does the Delete inis command do?  I'm guessing that windows would just rebuild them...  So that command probably puts them all back to their defaults? 

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 736
  • Call me Vic!
    • View Profile
    • Donate to Member
Re: AppFolderIcon thread
« Reply #2 on: February 15, 2021, 06:07 PM »
Do you want me to post them for fine-tuning purposes, or is this that can't really be adjusted anyway?

By all means post them! The idea is to have this program suit your needs/satisfy you in full! This way we also help others in need of the same functionality as well :)

Also, what does the Delete inis command do?  I'm guessing that windows would just rebuild them...  So that command probably puts them all back to their defaults?

You guessed right. Windows resets them all back to folder defaults.

[...]it intelligently determines which exe file is the most likely to contain the desired icon image[...]

There are three algos being used in succession:

- Levenshtein distance.
- Damerau-Levenshtein distance.
- Hamming distance.

(Source line)

We can do a new version with manual icon selection for the .exe names missed by the algorithms.

I'm thinking about a Graphical List with possible icons for single-click selection... Let's do this!
 :Thmbsup:
Vic
My name's Victor but do feel free to call me Vic! (now known as "paradisusvic")

❤️ Support on Patreon @ www.patreon.com/paradisusis
New Email/Paypal: paradisusvicgmail.com
« Last Edit: February 15, 2021, 06:13 PM by publicdomain »

kunkel321

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 602
    • View Profile
    • Donate to Member
Re: AppFolderIcon thread
« Reply #3 on: February 15, 2021, 06:48 PM »
I admire your dedication to the project!  But don't hard-code specific app names in there for me...  It would be bloat.   

Here is a screenshot of some of the misfires...  Actually I guess you could hard-code it to find "AutoHotkey." That is a fairly common app and lots of people probably have it.  The two Insofta apps are probably less common--don't bother with worrying about those.  As I was making the screenshot, I realized that "Insofta" is similar to "uninstall." No doubt that is what caused the error. 

Also, these are on a thumb drive, so I took the four bottom ones (which were skipped) and put them in a folder on my desktop just to see if it would make a difference.  AppFolderIcon can only see two of the folders(?) So that was weird.  I'll attempt to zip the folder and send if via PM. 

Other thoughts:  Maybe have it ignore any "Uninstall.exe?"  I notice (with my own setup at least) that the folder often has a version number, but the program exe often does not.  So maybe have it ignore numbers and the word "beta" or "version" in the folder name(???)  Not sure on that though...  EDIT: Maybe also ignore the word "portable." /

appfoldericon shot 2-15-2021.pngAppFolderIcon - Sets icon from .exe files on their containing folder (v0.2.0)
« Last Edit: February 15, 2021, 07:03 PM by kunkel321 »

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 736
  • Call me Vic!
    • View Profile
    • Donate to Member
Re: AppFolderIcon thread
« Reply #4 on: May 10, 2021, 10:16 PM »
We're finally getting to the new release of AppFolderIcon. Mod is a hybrid between suggested icon & manual selection.

(Releasing to the thread)
My name's Victor but do feel free to call me Vic! (now known as "paradisusvic")

❤️ Support on Patreon @ www.patreon.com/paradisusis
New Email/Paypal: paradisusvicgmail.com

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: AppFolderIcon thread
« Reply #5 on: May 11, 2021, 03:50 AM »
Good day!

Hello Vic, sorry that I do not know those algorithms personaly but this is how i would do, maybe it help to evolve application.

If I would code such a tool, I would stick to a method called "Diff", as name suggest it would calculate (compare) how many contiguous matches a Item has vs "Folder-Name".
Highest match would win. If result for a folder would end with "no" or "same amount of matches found" I would pop-up selection box. In addition to complete it, I would add Button to readjust manual (if not already done).

(Diff can be more or less easily done via RegEx)

I hope this inspire you a little  :D

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 736
  • Call me Vic!
    • View Profile
    • Donate to Member
Hello & good day!  :)

@KZ

Thanks for the inspiration! We've settled to use Ratcliff/Obershelp

@Kunkel & folks

First post has been updated with AppFolderIcon v0.2.0  :Thmbsup:

https://www.donation....msg443774#msg443774

Enjoy!
Vic
My name's Victor but do feel free to call me Vic! (now known as "paradisusvic")

❤️ Support on Patreon @ www.patreon.com/paradisusis
New Email/Paypal: paradisusvicgmail.com

kunkel321

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 602
    • View Profile
    • Donate to Member
Hey this is amazing!  Thanks PublicDomain! 

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 736
  • Call me Vic!
    • View Profile
    • Donate to Member
My pleasure! :)

BTW You can call me Vic:Thmbsup:

...Guess I should have registered as PublicDomainVic from day one LoL

On the other hand, I may be "HarmoniousVic" soon...
My name's Victor but do feel free to call me Vic! (now known as "paradisusvic")

❤️ Support on Patreon @ www.patreon.com/paradisusis
New Email/Paypal: paradisusvicgmail.com
« Last Edit: February 28, 2023, 08:56 AM by publicdomain »

kunkel321

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 602
    • View Profile
    • Donate to Member
Very nice -- "Vic" then.  Though "HarmoniousVic" has a nice ring to it! 

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Very nice -- "Vic" then.  Though "HarmoniousVic" has a nice ring to it! 

It does sound kind of "chordial" now that you mention it.   :D

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 736
  • Call me Vic!
    • View Profile
    • Donate to Member
Okay! I'll keep on as "Vic" / "publicdomainvic" :)
My name's Victor but do feel free to call me Vic! (now known as "paradisusvic")

❤️ Support on Patreon @ www.patreon.com/paradisusis
New Email/Paypal: paradisusvicgmail.com
« Last Edit: February 28, 2023, 08:57 AM by publicdomain »