Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

umzyi

macrumors 6502
Original poster
Apr 21, 2011
264
70
UK
Hi everyone :)

Every time I change a file extension of a file, it doesn't update until i restart the system.

For example, if i change the file extensions from quicktime to vlc player, they icon doesn't update but when i click on it, it does open in vlc player but the icon won't update until i restart the system. Same happens while changing from word to pages extension. Is there a way to force update the change of icons or is this a bug?

Any advice on this please? If this is a bug, I'll report to Apple.
 

Partron22

macrumors 68030
Apr 13, 2011
2,655
808
Yes
Have you tried just restarting the Finder (command option escape to bring up dialog)? That usually fixes such cosmetic problems for me, and it's much faster than a total restart.
 

umzyi

macrumors 6502
Original poster
Apr 21, 2011
264
70
UK
tried that already. doesn't change anything unless i restart. :(
 

Partron22

macrumors 68030
Apr 13, 2011
2,655
808
Yes
doesn't change anything unless i restart. :(
Possibly a Launch Services Database problem. When was the last time you cleaned it out?

Here's an AppleScipt for the purpose:
Code:
-- Rebuild Launch Services DB
--BP2013
--Modified from:
-- Adam Bell 2013
-- http://macscripter.net/viewtopic.php?id=40534

say "begin"
set flushLaunchSvcDB to "/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user"
do shell script flushLaunchSvcDB
delay 1
do shell script "killall Finder"
say "done"
 

umzyi

macrumors 6502
Original poster
Apr 21, 2011
264
70
UK
Thanks for the script.

I have run the script after changing file extensions and I can confirm that it works. I changes the icons straight away after running the script.

However, I have noticed that you have to run that script every time after changing the file extension.

Does that means that there is actually a bug which is not flushing the services after changing file extensions?

Thanks
 

Partron22

macrumors 68030
Apr 13, 2011
2,655
808
Yes
That's odd. I only run the script every month or so, when I'm offered 5 different copies of Preview in the "Open With" submenu, yet my icons usually change immediately after I change an extension. You've got somethiong else going on as well, but I don't know what it is. At least you've got a partial fix now.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.