You want NSWorkspace's selectFile: inFileViewerRootedAtPath: method rather than openFile: with Application
Best Phil > On 31 Oct 2016, at 17:00, Gerriet M. Denkmann <gerri...@icloud.com> wrote: > > > I want to show a file in Finder (not open it in some application). > > I tried: > NSString *path = @“/some/thing.plist”; > [ sharedWorkspace openFile: path withApplication: @“Finder.app" ] > but this opens Xcode and displays the content of path. > > I just want a Finder window with my path selected. > How can this be done? > > (Preferably without using AppleScript). > > macOS 12.1 > > Gerriet. > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/sqwarqdev%40icloud.com > > This email sent to sqwarq...@icloud.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com