Launch Finder window with specific files selected

后端 未结 7 1355
执笔经年
执笔经年 2020-12-12 22:21

I\'m trying to programmatically launch an OS X Finder window from an Xcode project. I need the window to open to a specific folder and have specific files within that folder

相关标签:
7条回答
  • 2020-12-12 23:02

    Another AppleScript flavor - the Finder's reveal command will both open a window to the containing folder and select the item(s). If there are multiple containing folders, multiple Finder windows will be opened.

    tell application "Finder" 
       to reveal {someAlias, "path/to/POSIXfile" as POSIX file, etc}
    
    0 讨论(0)
提交回复
热议问题