-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAppleScript
More file actions
18 lines (12 loc) · 782 Bytes
/
AppleScript
File metadata and controls
18 lines (12 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(*
Modified from:
Speed up Mail.app by vacuuming the Envelope Index
Code from: http://www.hawkwings.net/2007/03/03/scripts-to-automate-the-mailapp-envelope-speed-trick/
Originally by "pmbuko" with modifications by Romulo
Updated by Brett Terpstra 2012 <http://brettterpstra.com>
*)
tell application "Mail" to quit
set sizeBefore to do shell script "ls -lah ~/Library/Mail/V10/MailData | grep -E 'Envelope Index$' | awk {'print $5'}"
do shell script "/usr/bin/sqlite3 ~/Library/Mail/V4/MailData/Envelope\\ Index vacuum"
set sizeAfter to do shell script "ls -lah ~/Library/Mail/V10/MailData | grep -E 'Envelope Index$' | awk {'print $5'}"
display dialog ("Mail index before: " & sizeBefore & return & "Mail index after: " & sizeAfter & return & return & "Enjoy the new speed!")