|
|
10.4: Disable Spotlight on a FAT32 external drive
i have an applescript that moves my external drives up and to the left of my main drives. while it's doing that, it creates to 'don't index this drive' file automatically.
tell application "Finder"
set x_offset to -146
set y_offset to 44
set i to 1
try
set {currX, currY} to desktop position of startup disk
set sortedFiles to (selection as list)
sort sortedFiles by creation date
repeat until i > (count of sortedFiles)
set thisItem to item i of (selection as list)
set desktop position of thisItem to {currX + x_offset, currY + y_offset}
set y_offset to y_offset + 44
set i to i + 1
end repeat
tell application "Finder"
activate
ignoring application responses
tell application "Finder" to set selection to {}
end ignoring
end tell
end try
end tell
tell application "Finder"
try
set {currX, currY} to desktop position of startup disk
set desktop position of disk "lizard_bax_1" to {currX + -73, currY + 2}
try
make new file at disk "lizard_bax_1" with properties {name:".metadata_never_index"}
on error -- couldn't make spotlight prevention file on lizard_bax_1
end try
try
set desktop position of disk "sparrow_bax_1" to {currX + -73, currY + 46}
make new file at disk "sparrow_bax_1" with properties {name:".metadata_never_index"}
on error -- couldn't make spotlight prevention file on sparrow_bax_1
end try
set desktop position of disk "misc_bax_1" to {currX + -73, currY + 92}
set desktop position of disk "_stuff" to {currX + -146, currY + 2}
set desktop position of folder "desktop_misc" to {currX, currY + 92}
end try
try
set {currX, currY} to desktop position of startup disk
set desktop position of disk "lizard_bax_2" to {currX + -73, currY + 2}
try
make new file at disk "lizard_bax_2" with properties {name:".metadata_never_index"}
on error -- couldn't make spotlight prevention file on lizard_bax_2
end try
set desktop position of disk "sparrow_bax_2" to {currX + -73, currY + 46}
try
make new file at disk "sparrow_bax_2" with properties {name:".metadata_never_index"}
on error -- couldn't make spotlight prevention file on sparrow_bax_2
end try
set desktop position of disk "misc_bax_2" to {currX + -73, currY + 92}
set desktop position of disk "_stuff" to {currX + -146, currY + 2}
set desktop position of folder "desktop_misc" to {currX, currY + 92}
end try
activate
end tell
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|