Hey There,
This is a bit after-the-fact, but let’s post some troubleshooting methods for posterity.
Generally if you’ll copy a posix path directly from an error report and use the open
command in the Terminal with the -R switch (reveal) you’ll find a file immediately.
open -R /Library/ScriptingAdditions/QXPScriptingAdditions.osax
QUOTE the path if it has any spaces in it.
open -R "/Applications/Test Folder/My Test File.txt"
Creating a report of installed OSAXen complete with HFS paths is easy enough:
-------------------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2015/06/29 09:45
# dMod: 2015/06/29 10:27
# Appl: Finder & TextEdit
# Task: Create Report of installed Scripting Additions on Desktop & Open Report in TextEdit
# Tags: @Applescript, @Script, @Finder, @Report, @Installed, @Scripting_Additions, @OSAX
-------------------------------------------------------------------------------------------
set scriptingAdditionsList to {}
set scriptingAdditionsFolders to {path to scripting additions folder from user domain, path to scripting additions folder from local domain, path to scripting additions folder from system domain}
set reportFilePath to POSIX path of ((path to desktop as text) & "Installed Scripting Additions " & (do shell script "date '+%Y.%m.%d · %H.%M.%S'") & ".txt")
set AppleScript's text item delimiters to linefeed
tell application "Finder"
repeat with i in scriptingAdditionsFolders
set scriptingAdditionsList to scriptingAdditionsList & (items of i as alias list)
end repeat
end tell
set shCMD to "
reportFilePath='" & reportFilePath & "';
printf " & quoted form of (scriptingAdditionsList as text) & " > \"$reportFilePath\";
open -e \"$reportFilePath\";
"
do shell script shCMD
-------------------------------------------------------------------------------------------
A report with posix paths may be produced with a fairly basic one-liner in the Terminal:
find ~/Library/ScriptingAdditions /Library/ScriptingAdditions /System/Library/ScriptingAdditions -maxdepth 1 -name "*.*" \! \( -name ".DS_Store" \) | open -f
If I was at a complete loss at where to search I might run something like this from the Terminal:
First try using Spotlight (fast):
mdfind 'kMDItemFSName == "QXPScriptingAdditions.osax"c'
Second try using find
and starting the search at the root of the drive (pretty slow):
sudo find / -name "QXPScriptingAdditions.osax"
Note that sudo
will require you to enter your Admin password.
Fortunately I don’t have to resort to the fairly slow search from the Terminal, because I have a couple of good search utilities that can find as root ” Find Any File and File Buddy.
Find Any File is cheap at $6.00 U.S.
No Mac User should be entirely dependent upon Spotlight for finding files on their system. Spotlight is totally dependent upon the hard drive having been indexed, and such systems are not always reliable. And for that matter Spotlight by default does NOT find files in the System area.
File Buddy is the 700lb Gorilla of Mac file-search utilities and has many other functions, and v10.0.2 works fine on Mavericks (I can’t yet say about Yosemite, but I’ll be surprised if it doesn’t).
You can use Spotlight in the Finder for this kind of task if you know how to search for system files, but Apple makes you jump through a couple of hoops to make that option available.
It is necessary to select ‘Other’ in the search attribute pop-up menu, find ‘System Files’, and check the check-box before the ‘System Files’ criteria will be available in the Spotlight user-interface.
You can get a little more creative by using a raw-query, but like the ‘System files’ attribute you have to enable ‘Raw query’ to make it available in the Spotlight user-interface.
kMDItemFSName == "*.osax"c
- means any character zero or more.
c means case-insensitive.
The upshot is that it’s not so very difficult to find files on your system. You just need a little knowhow.