Recent

Author Topic: "Open in Explorer..."  (Read 531 times)

imekon

  • New Member
  • *
  • Posts: 23
"Open in Explorer..."
« on: February 18, 2026, 03:20:44 pm »
What's a platform independant way of 'open in explorer', i.e. open a selected file in the file explorer of an OS?

I know how to do it for Windows but what about Linux or MacOS? Is there a platform independant way or is it OS specific?

Zvoni

  • Hero Member
  • *****
  • Posts: 3315
Re: "Open in Explorer..."
« Reply #1 on: February 18, 2026, 03:46:03 pm »
What's a platform independant way of 'open in explorer', i.e. open a selected file in the file explorer of an OS?

I know how to do it for Windows but what about Linux or MacOS? Is there a platform independant way or is it OS specific?
What do you mean?
"open in explorer" like "show that file in its Location within the File-System"?

because that would actually be "open a Folder in the file explorer"

"opening a File" is usally a call to a program with the file as an argument, or simply a "open a file with its assigned standard-program according to its file-extension"
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12208
  • Debugger - SynEdit - and more
    • wiki
Re: "Open in Explorer..."
« Reply #2 on: February 18, 2026, 03:52:09 pm »
You might want to look at https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/28ba5306c358d81ac0290eafbf651908921b6d9e

IIRC, this
- open the file explorer of the OS
- selects the file in the list of files of the explorer

It also has changes to the IDE, to use that. But you don't need the IDE part.

This was added in "main", so the code isn't available in 4.x

imekon

  • New Member
  • *
  • Posts: 23
Re: "Open in Explorer..."
« Reply #3 on: February 18, 2026, 06:39:46 pm »
SelectInPath is what I'm looking for

 

TinyPortal © 2005-2018