Originally Posted By: ryck
Originally Posted By: kevs
You ever notice that Hal, hardly ever provides much useful information........


I second the "What!!!??"

There are some extremely knowledgeable people here, but I've learned more from Hal than from everyone else put together, and that's saying a lot because, like I said, there are many other knowledgeable people here. Pay very close attention when he speaks.

His contribution to this thread, and apparently what you're objecting to, was to remind you that you can find out stuff on your own without waiting to have the information spoon-fed to you. His advice would fall under the "Teach a person to fish..." philosophy. If you want to learn, you should listen.

As for relaunching Finder...

Relaunching Finder is for emergencies, like when Finder stops responding. It should not be used for something as trivial as hoping to refresh some icons. Doing so may in fact have the opposite effect of the one intended.

Finder uses the invisible .DS_Store file in each folder to record information about the folder and the items it contains: window size, position, view, icon positions, Spotlight comments, and even thumbnails. For efficiency, it caches this information in RAM (because it's constantly changing and Finder doesn't want to be banging the disk), and only occasionally updates the actual .DS_Store file. It does always update the file when it quits, as happens when you log out.

But when you relaunch Finder, it isn't given a chance to quit. Relaunch yanks the rug out from under it, killing it dead even if it was in the middle of doing something. If this happens at the wrong time, whatever Finder was doing can be left half-done. One way to corrupt a file is to leave it partially updated, and if you happen to kill Finder when it's in the middle of updating a .DS_Store file that file can be left corrupted. Odd icon behavior, in particular, is a common symptom of a corrupted .DS_Store file.

I'm not saying that "Relaunch Finder" alway, or even usually, corrupts .DS_Store files, but it can, and force-quitting Finder or any other application is both rude and potentially harmful. Only do it when the program is already being rude to you by not listening.

When I want to quit and restart Finder, I usually do it from the command line, using the Terminal command:

osascript -e 'tell application "Finder" to quit'

If you don't want to do it from the command line, you can instead use AppleScript Editor to create the one-line script:

tell application "Finder" to quit

Save that as ~/Library/Scripts/Applications/Finder/"Quit Finder.scpt", creating missing folders as needed.

While you're in AppleScript Editor, open its Preferences and enable "Show Script menu in menu bar". That adds a menulet to the right side of your menubar, with an icon that looks kinda like a paper scroll. When you're in Finder, that menu will now have a "Quit Finder" item.

Using "Quit Finder" (unlike "Relaunch Finder") politely asks Finder to quit, giving it a chance to clean up after itself. In particular, all the information it has been holding in RAM gets cleanly written to all the affected .DS_Store files.

After you Quit Finder, you can launch it again at your leisure by clicking on its Dock icon. (When I quit Finder from Terminal, it's usually as part of a script that eventually has a matching osascript -e 'tell application "Finder" to launch'.)

To see the difference it makes, move a Finder window and maybe change its view. Use the "Relaunch Finder" command, and notice that your changes are lost. The window reappears in its original location and using its original view.

Do the same thing using "Quit Finder" instead, and notice that your changes are preserved.

Now extrapolate to icons. Indiscriminate use of "Relaunch Finder" (or the Terminal equivalent killall Finder) can leave stale icon information in the .DS_Store file.

You can force Finder to rebuild a corrupted .DS_Store file by deleting it. (Google will tell you how.) Finder will rebuild it the next time it's called upon to display the contents of that folder. It'll for sure get the icon thumbnails right if it does, but be cautioned that this also is not a procedure that you should consider normal. There's a lot of other information in the .DS_Store files (like Spotlight comments, for example) that you'll be throwing out when you do this.