Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Searches in Finder window with Applescript

I am running IOS 10.9.5 My AppleScript editor version is 2.6.1 (AppleScript 2.3.2) (mostly this machine)


The other computer I may want to do this with is running IOS 10.7.5 with AppleScript Editor 2.4.3 (AppleScript 2.2.1)


Using AppleScript I want to pull up a Finder window and do a search. In the process of cleaning out my files I do the same searches repeatedly. And on different drives as well. Sometimes I want them separated (a drive in each window). I thought it would be easier to make an AppleScript so I don't have to type (or copy) and select the file type each time. Just to clarify, I would like the results in a Finder window.


Any ideas are greatly appreciated.

Posted on Mar 17, 2015 2:18 PM

Reply
Question marked as Best reply

Posted on Mar 17, 2015 7:05 PM

Why not just create Finder Saved Searches for the searches you do repeatedly? Then you just need to click on the saved search and the results will be displayed in the Finder.

4 replies

Mar 18, 2015 6:55 PM in response to DeejosDesigns

Tweaking a saved search is fairly easy. You always have access to the saved searches search criterion and they can be changed at will.


For example here is a saved search I have to find files over a certain size

User uploaded file

By right clicking the saved search in the side bar the contextual menu is displayed. From there select Show Search Criterion. Then you get this

User uploaded file

You can change what is there, add criterion, etc and either make it a one time thing or save it as a new search.


So this winds up being easier then going in and editing a script, at least to my thinking. There will be some threshold of complexity over which it might be easier to do it from a script but the search facility in the Finder is pretty comprehensive.


If you post back with more specifics about the searches you are looking to do a determination as to which way might work best could be made.

regards

Mar 19, 2015 12:15 PM in response to GeoCo

I was looking at your post. The reason for so many searches is because I'm trying to get my files organized. Which is a humongous task, so I was doing a little a time.


I have some searches I had saved but didn't have them in the sidebar because I was getting too many sidebar items. Now I wasn't able to edit them or put them back in the sidebar (so I can edit them). I have put that project on hold for a little while and have been learning AppleScript. (I just wanted to do something more fun). The one thing I was not able to edit (when I could edit the search) was changing a drive. It's not a big deal, I can make new ones. I'm not sure where I left off anyway. Just thought it would be more convenient in AppleScript.


Thanks for all your help.

Searches in Finder window with Applescript

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.