How to change a folder icon ?

Thank you, installed it and no error anymore

beautiful applescript; was looking for this functionality in applescript, started writing my own but didn’t get very far due the lack of sufficient knowlegde

but i applied it to my music folder, in which every folder contains a jpg-file, but not every folder get an icon

i understand that the script takes the first jpg which the folder contains, but apparently there must be a difference somewhere

Edit: I found the difference, the jpg files contain special symbols like é and ü etc…

thx very much