Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use an AppleScript to manage Spotlight indexing System
I wrote an AppleScript droplet to manage the settings of Spotlight indexing for a volume. It's called Refocus, and may be downloaded from here.

To use it, drop a volume icon on the Refocus application icon and you'll be prompted to enter your password. After entering the password, if the dropped volume's Spotlight indexing is turned on, you'll be prompted to either turn it off, rebuild it, or cancel. If the dropped volume's indexing was turned off when dropped, you'll be prompted to turn it on or cancel. If you run the script without dropping anything, the operation will be performed on your startup disk. You'll then be asked to confirm that the full path of the disk that will be re-indexed is the disk you dropped. That path will be a Unix style path such as '/' for your startup disk or '/Volumes/archives/' for a disk named 'archives.' The script won't do anything if the disk you dropped appears in the Privacy area of the Spotlight System Preference pane.

If you want to create a version of the Refocus droplet that doesn't require you to enter your password each time you drop a volume icon, run the included 'Create Refocus with Authentication' script. If your password changes, you'll have to create the droplet again, of course.

Usage suggestion: Keep Refocus in your Dock. If indexing begins after a volume is mounted and you know you don't want it indexed, drop it on Refocus to quickly and permanently stop indexing for that volume.

[crarko adds: I haven't tested this one. The downloaded disk image has both the droplet (which can be opened in AppleScript Editor to view the source and the source to the modified script that saves the password.]
    •    
  • Currently 4.00 / 5
  You rated: 5 / 5 (4 votes cast)
 
[5,698 views]  

Use an AppleScript to manage Spotlight indexing | 2 comments | Create New Account
Click here to return to the 'Use an AppleScript to manage Spotlight indexing' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use an AppleScript to manage Spotlight indexing
Authored by: schutt on Nov 05, '10 03:50:11PM

Now, if only there was a way to pause Spotlight without it reindexing when you start it again...



[ Reply to This | # ]
Use an AppleScript to manage Spotlight indexing
Authored by: llee on Jul 14, '11 02:36:36PM
My company retired the server I was using. Here's the new location for the linked information.

[ Reply to This | # ]