System requirements
You need to have applescript installed to be able to run this.
What is it and why do I need it?
You should occassionally rebuild your desktop (database). The
desktop (database) is a database of all programs and files on your
computer. The desktop database is frequently accessed by other
programs. For instance when you double-click a file, the Finder asks
the desktop database what program to start. Whenever you Install a
program on your harddisk, information about that program is added to
the database. Whenever you delete a program from your harddisk,
nothing is done to the database. After some use, the desktop
(database) becomes full of redundant information. Rebuilding the
desktop (database) insures that all information is up to date. Finder
will also find information faster if the desktop (database) is up to
date. A few years back Apple recommended a rebuild each month.
Rebuilding the desktop is done by pressing Option and Command while
the Finder starts, but if you have a startup that take a minute or
two, this can be very tedious. So this program attempts to fix this
by restarting the Finder.
The program is an applescript that shuts down the Finder and restarts
it. That is all it does, all the hard work is left to the Finder.
Feel free to open it in the Applescript editor and examine it.
NOTE. If Finder restarts too soon, it might lock up. Therefore
when the dialog comes up, it tells you to wait and count to 10. It is
still a lot faster than restarting your computer.
The code. This is the code.
property cr : ASCII character 13
tell application "Finder"
ignoring application responses
quit
end ignoring
end tell
repeat with i from 1 to 10000
end repeat
display dialog "Wait till your computer ceases all activity." & cr & "Count to 10." & cr & "Press option-Command and hit OK. Keep keys pressed till Finder restarts."
ignoring application responses
tell application "Finder"
activate
end tell
end ignoring
quit