You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Applescript: Finder set target to smart folder

If I try to open a Smarty-Folder using applescript it does not seem to work properly. It seems to open the right path, but not show any items, also you can see the file-tree at the very bottom (that you usually just see in normal directories)

tell application "Finder" to set target of front Finder window to POSIX file "/Users/stockholm/Documents/Useful-Files/Settings/Finder/Search-Project/Julian-In_Progress.savedSearch"




It works when I use open, but this does open it in a new window, which I do not want.

tell application "Finder" to open POSIX file "/Users/stockholm/Documents/Useful-Files/Settings/Finder/Search-Project/Julian-In_Progress.savedSearch"



Anyone an idea why this happens? Still very new to applescript, would appreciate your advice.

kind regards Julian


Posted on May 28, 2019 9:49 AM

Reply
Question marked as Top-ranking reply

Posted on May 28, 2019 4:05 PM

You can't set a Finder window's target to a Search Folder.

I think it is because a Search Folder isn't actually a folder at all.

Similar questions

2 replies

Applescript: Finder set target to smart folder

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