Show File In Finder

I am looking for a way to launch Finder and highlight a file.

FolderItemDirectory.Child(“filename”).launch but this does nothing

FolderItemDirectory.Child(“filename”).parent.launch opens and highlights the parent directory

please advise.

There is a search function on top right :slight_smile:

https://forum.xojo.com/conversation/post/372002

And if you have a new question, let us know what OS…

Maybe you can use the function in this post
it’s in Italian but you can easily use it

[quote=374403:@Antonio Rinaldi]Maybe you can use the function in this post
it’s in Italian but you can easily use it[/quote]
The topic that Axel referenced contains the proper declares to do this and does not rely on the SHELL
and as how he specified FINDER, one should rightfully assume it is needed for macOS

[quote=374403:@Antonio Rinaldi]Maybe you can use the function in this post
it’s in Italian but you can easily use it[/quote]

English…
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0ahUKEwij25-erbXZAhWOylkKHXVFAZ8Q7gEIMDAB&url=https%3A%2F%2Ftranslate.google.com%2Ftranslate%3Fhl%3Den%26sl%3Dit%26u%3Dhttps%3A%2F%2Fwww.xojoitaliablog.com%2Fevidenziare-un-file-sul-desktop%2F%26prev%3Dsearch&usg=AOvVaw2V-w1YRleo9q84LhBTC0Cx

Lennox

Sorry everyone, this question is for MACOS

Declare Function objc_getClass Lib "libobjc.dylib" ( name As CString ) As ptr
Declare Function sharedWorkspace Lib "AppKit" selector "sharedWorkspace" ( obj As ptr ) As ptr
Declare Function selectFile Lib "AppKit" selector "selectFile:inFileViewerRootedAtPath:" ( obj As ptr, fPath As CFStringRef, rootFullPath As CFStringRef ) As Boolean
Dim workspace As ptr = sharedWorkspace( objc_getClass( "NSWorkspace" ) )
// assert ( workspace <> nil, CurrentMethodName + " is Nil")
Call selectFile( workspace, f.Nativepath, "")

Axel
it does work good,

Thank you all.