Skip to main content
10 events
when toggle format what by license comment
Sep 2, 2021 at 4:48 comment added Runty Got glocate to work by specifying location of my locatedb: do shell script "[[ -f \"$HOME/locatedb\" ]] && export LOCATE_PATH=\"$HOME/locatedb\"; /usr/local/bin/glocate -i '*my_filter*'
Sep 2, 2021 at 4:02 comment added user3439894 @Runty, RE: "is it okay to do a follow-up here?" -- It depends on the question and in this particular use case It's better that you post a new question, showing what you are working with and how it's not doing as you expect/want, etc. Also note that glocate is not a default part of macOS, so you should include appropriate information about it as well. Thanks.
Sep 2, 2021 at 3:56 comment added Runty @user3439894, is it okay to do a follow-up here? I'm trying to get it to work with gnu locate glocate but I'm getting the error error "Can’t get some item of {}." number -1728 from some item of {}. The only difference that I can see in the output is that glocate does not include the beginning slash of the pathnames. How can I get this script to work with glocate instead of find?
Sep 2, 2021 at 3:48 comment added user3439894 @Runty, RE: "I don't actually know the significance of whose visible is true" -- It forces the inclusion of only visible files, or excludes hidden files, which in your use case I doubt you have any hidden PDF files and as such wouldn't be necessary and why I did not include it in my example AppleScript code.
Sep 2, 2021 at 3:27 comment added Runty @wch1zpink, I don't actually know the significance of whose visible is true. I was just copy-pasting code found by googling. In my use case it probably doesn't matter. Sorry about that!
Sep 2, 2021 at 1:49 comment added user3439894 @wch1zpink, RE: "This solution does not filter the whose visible is true property as requested in the OP" -- Even though the code in the OP was doing that, nonetheless, there was no explicit request made in the text of the question that it must filter on visible PFD files. BTW It also didn't contain pdfs in the path portion of the find command. Note that it's was clearly and plainly stated "Example AppleScript code:", meaning it's just that, an example!
Sep 2, 2021 at 1:22 comment added wch1zpink This solution does not filter the whose visible is true property as requested in the OP
Sep 2, 2021 at 1:09 vote accept Runty
Sep 2, 2021 at 1:09 comment added Runty Thank you! This works, and works quickly. I shouldn't have specified System Events in my title. Alternative ways are fine.
Sep 1, 2021 at 23:21 history answered user3439894 CC BY-SA 4.0