Is there a way to have two options to open an *.md in two programs?

Discussion related to "Everything" 1.5.
Post Reply
Biff
Posts: 1242
Joined: Mon May 25, 2015 7:09 am

Is there a way to have two options to open an *.md in two programs?

Post by Biff »

Is there a way to have two options to open an *.md in two programs? In LibreOffice and Notepad++? With a double click in Notepad++ (like it is now) and additionally in LibreOffice. Maybe with a double click while pressing a key or so?
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there a way to have two options to open an *.md in two programs?

Post by void »

Can be done with Custom Open Commands

To create a right click menu option to open md files in LibreOffice:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    custom
  • Select: custom_open_commands
  • Click Edit....
  • Click Add Item....
  • Set the name to:
    Open with LibreOffice
  • Set the filter to:
    *.md
  • Set the command to:
    "C:\Program Files\LibreOffice\program\soffice.exe" "%1"
  • Click OK. (to create the item)
  • Click OK. (to save the table)
  • Click OK.
Right click your md file and click Open with LibreOffice.
Biff
Posts: 1242
Joined: Mon May 25, 2015 7:09 am

Re: Is there a way to have two options to open an *.md in two programs?

Post by Biff »

Ah, super, done, thank you very much!
Biff
Posts: 1242
Joined: Mon May 25, 2015 7:09 am

Re: Is there a way to have two options to open an *.md in two programs?

Post by Biff »

What is wrong here:

Image

In the "Edit Table" ("Advanced" in "Options"), custom_open_commands.

FIlter: *.md;*.txt
Command: "C:\Users\Leno\AppData\Local\Programs\Obsidian\Obsidian.exe" "%1"

Does not open:
Image
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there a way to have two options to open an *.md in two programs?

Post by void »

Please make sure the path
C:\Users\Leno\AppData\Local\Programs\Obsidian\Obsidian.exe
exists.

Please check the command line options for Obsidian.
Biff
Posts: 1242
Joined: Mon May 25, 2015 7:09 am

Re: Is there a way to have two options to open an *.md in two programs?

Post by Biff »

Yes, it exists.

So, nothing else to do, adjust in Everything?
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there a way to have two options to open an *.md in two programs?

Post by void »

Does Obsidian launch if you try the following:
From the Start menu, search for:
run

Click Run.
Copy and paste the following command:
C:\Users\Leno\AppData\Local\Programs\Obsidian\Obsidian.exe

Click OK.
Does Obsidian launch?
Biff
Posts: 1242
Joined: Mon May 25, 2015 7:09 am

Re: Is there a way to have two options to open an *.md in two programs?

Post by Biff »

When I do this
Image
Obsidian starts:

Image
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there a way to have two options to open an *.md in two programs?

Post by void »

Thanks for checking Start -> Run.

Please send a debug log:
  • In Everything, from the Tools menu, under the Debug submenu, click Start Debug Logging...
  • Right click an md file and click Open with Obsidian.
  • In Everything, from the Tools menu, under the Debug submenu, click Stop Debug Logging...
    This will open your %TEMP%\Everything Debug Log.txt
  • Please upload this file in a bug report.
Biff
Posts: 1242
Joined: Mon May 25, 2015 7:09 am

Re: Is there a way to have two options to open an *.md in two programs?

Post by Biff »

OK, done.

Many thanks!
therube
Posts: 5711
Joined: Thu Sep 03, 2009 6:48 pm

Re: Is there a way to have two options to open an *.md in two programs?

Post by therube »

Open with LibreOffice does work as expected?

From Start Menu (or C:\> prompt) does:
"C:\Users\Leno\AppData\Local\Programs\Obsidian\Obsidian.exe" "c:\somedir\abc123.md"

cause Obsidian to open, loading abc123.md?

Or does Obsidian need some different command-line syntax? Maybe:
"C:\Users\Leno\AppData\Local\Programs\Obsidian\Obsidian.exe" "file=c:\somedir\abc123.md"
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there a way to have two options to open an *.md in two programs?

Post by void »

2026-05-25 10:43:45.740: Admin: 0
...
2026-05-25 10:43:52.470: Parameters '"I:\Downloads\file.md"'
2026-05-25 10:43:52.470: Directory 'C:\Users\user\AppData\Local\Programs\Obsidian'
2026-05-25 10:43:52.470: File 'C:\Users\user\AppData\Local\Programs\Obsidian\Obsidian.exe'
2026-05-25 10:43:52.470: Mask 00000100
2026-05-25 10:43:52.470: Enter ShellExecute
2026-05-25 10:43:52.491: ShellExecute OK
Thank you for the logs.

The parameter, working directory, and file to open all look correct.
ShellExecute succeeds.
I don't have a good explanation as to why Obsidian doesn't show.
As far as Everything is concerned, the call to open Obsidian succeeded.

Please try the following:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    custom
  • Select: custom_open_commands
  • Click Edit....
  • Select Open with Obsidian.
  • Click Edit....
    Change the command to:

    Code: Select all

    notepad.exe "%1"
    
  • Click OK. (to save changes to the item)
  • Click OK. (to save changes to the table)
  • Click OK.
Right click an md file and click Open with Obsidian.
If this opens in Notepad, then something is up with Obsidian.



Obsidian blocking files launched from Everything.exe?
-try reverting to Open with Obsidian command to:
"C:\Users\<your-username>\AppData\Local\Programs\Obsidian\Obsidian.exe" "%1"

(adjust <your-username> to your username)
copying your Everything.exe to e2.exe
Exit Everything (File -> Exit)
Launch e2.exe
Right click an md file and click Open with Obsidian.
Does the issue persist?
Post Reply