Can one assign special programs to special extensions?

If you are experiencing problems with "Everything", post here for assistance.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Ah no, sorry again, I totally mixed up the files and anything else.

These are the correct files which should be used:

Image

This the correct / edited (I hope at least) ini:

Code: Select all

;==	Where is Everything.ini
;	EVERYTHINGINI=C:\Program Files\Everything\Everything.ini
	EVERYTHINGINI=J:\Programme\Everything\Everything.ini


;==	File associations.
;	Enclose program names in ""
;	INI="C:\Tools\Notepad++\notepad++.exe"

	
;	If you have multiple extensions using the same program, define them like this:
;	bmp;gif;jpeg;jpg;png;tif;tiff="c:\tools\voidimageviewer.exe"
;
;	If lines are getting too long to inspect easily, split them like this:
;	3g2;3gp;3gp2;3gpp;amr;amv;asf;avi;bdmv;bik="C:\Tools\vlc\vlc.exe"
;	d2v;divx;drc;dsa;dsm;dss;dsv;evo;f4v;flc="C:\Tools\vlc\vlc.exe"
;	( etcetera ..)

;	Some programs are started with parameters, like -open
;	Add those if needed. The filename will be added at the end.
;	Example (not a real one):
;	INI="C:\Program Files\LibreOffice\program\swriter.exe" -open


	ani;bmp;gif;ico;jpe;jpeg;jpg;pcx;png;psd;tga;tif;tiff;wmf;cr2="J:\Programme\XnViewMP\xnviewmp.exe"
	3g2;3gp;3gp2;3gpp;amr;amv;asf;avi;bdmv;bik;d2v;divx;drc;dsa;dsm;dss;dsv;evo;f4v;flc;fli;flic;flv;hdmov;ifo;ivf;m1v;m2p;m2t;m2ts;m2v;m4b;m4p;m4v;mkv;mp2v;mp4;mp4v;mpe;mpeg;mpg;mpls;mpv2;mpv4;mov;mts;ogm;ogv;pss;pva;qt;ram;ratdvd;rm;rmm;rmvb;roq;rpm;smil;smk;swf;tp;tpr;ts;vob;vp6;webm;wm;wmp;wmv="J:\PortableApps\PortableApps\MPC-HCPortable\MPC-HCPortable.exe"
	txt;ini="J:\Programme\Notepad++\notepad++.exe"


;==
Very sorry again for the total confusion.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Biff wrote: Fri Mar 13, 2020 11:08 pm Very sorry again for the total confusion.
No worries .. I survived ;)

With these settings it looks like it should work again.
Before rebooting (don't reboot yet! There are more checks to be done..), could you check if double-clicking a .jpg file in Everything opens it in xnviewmp.exe?
(or check any of the other redirected file extensions)
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

No worries .. I survived ;)
Thank goodness. Thank you. But causing (unnessecary / senseless) trouble is not good anyway.

Yes, it works like it should. I have closed Everything and executed the cmd and pressed "I", restarted Everything and it works like it always did and should so to say. I haven't restarted the Notebook yet again, because closing / restarting all of the programs / windows is quiet enconveniet. The Notebook generally goes to hibernate usually. But I guess after the next Notebook restart I have to execute the cmd file again.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Biff wrote: Sat Mar 14, 2020 11:14 am But I guess after the next Notebook restart I have to execute the cmd file again.
That should not be necessary. The settings in Everything.ini are correct and point to an existing .cmd. The accompanying .ini file is configured correctly too.
If this stops working after a reboot, there is some external factor in play.

What does this (CMD) command output on the screen?

Code: Select all

reg query hklm\software\microsoft\windows\currentversion\run /v "Everything"
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

That sounds good, actually I should have used the correct cmd and ini files....but who knows what I am doing...

This is shown:
Image

Oops, that is the wrong Everything, I suppose, it should be the one here: J:\Programme\Everything. Any idea how this can happen.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

There are many ways how this could happen, but if you don't know ... how could I?

I do know how to fix it though:
  • In Everything, go to Menu:Tools > Options > General
  • Uncheck Start Everything on system startup
  • Click OK
  • Answer the UAC prompt (if asked so)
  • Completely exit Everything
  • Check if the registry entry is gone:
    • enter this command in CMD:

      Code: Select all

      reg query hklm\software\microsoft\windows\currentversion\run /v "Everything"
    • the output should be (the German version of) ERROR: The system was unable to find the specified registry key or value.
      If not: report back
      If true: proceed
  • In File Explorer, go to J:\Programme\Everything
  • Double-click Everything.exe
  • In Everything, go to Menu:Tools > Options > General
  • Check Start Everything on system startup
  • Make sure is is a v and not a little black square (I hope you understand this)
  • Click OK
  • Answer the UAC prompt (if asked so)
  • Extra check:
    The
    /open_file_command2
    command you tried earlier should still show
    open_file_command2=$exec("J:\Programme\Everything\EverythingFileAssociations.cmd" "%1")
    in the status bar.
  • Done.
Now the universe is aligned and synchronized again. After a reboot, your files should be opened in the portable apps you configured in the INI. No need to run the CMD again.
(At least ... that is what I hope for :))
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

There are many ways how this could happen, but if you don't know ... how could I?
Well, I absolutely do not know anything. I guess, it was superfluous to mention it again. But it is an Everything I do not use anymore.
Uncheck Start Everything on system startup
It is check like this until now (I now completely unchecked it):
Image
the output should be (the German version of) ERROR: The system was unable to find the specified registry key or value.
If not: report back
If true: proceed
I rather report. This is shown now:
Image
Answer the UAC prompt (if asked so)
Never been aksed today.
Extra check:
The
/open_file_command2
command you tried earlier should still show
open_file_command2=$exec("J:\Programme\Everything\EverythingFileAssociations.cmd" "%1")
in the status bar.
Sorry, this is shown:
Image

I assume, there still anything is wrong with this universe. The associations do still work (without having used the cmd file).
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Can one assign special programs to special extensions?

Post by ovg »

Biff wrote: Sat Mar 14, 2020 6:58 pm
Extra check:
The
/open_file_command2
command you tried earlier should still show
open_file_command2=$exec("J:\Programme\Everything\EverythingFileAssociations.cmd" "%1")
in the status bar.
This should be done in Everything's search bar
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Very sorry...but...my brain...

So, appears to look good now, I guess:
Image

Sorry again, and many thanks for saving the universe and my Everything.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Biff wrote: Sat Mar 14, 2020 7:46 pm many thanks for saving the universe and my Everything
You're welcome!

Now I only have to do something about Life and ....
"Answer to the Ultimate Question of Life, the Universe, and Everything" completed! (might take me a while ... ;))
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

@biff:

What file manager is it you are using? (and where do all these buttons in the title bar come from?)

EDIT:
Never mind; it is FreeCommander
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Sorry for the hesitation, was not at home.

Yes, it is FreeCommander. The buttons are there by default (if I remember it right), there are many buttons which can be added / removed there, the bar / line can be customized.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Thanks!
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Can I use the same EverythingFileAssociations.ini for all of the 3 instances I have? If yes, how? Or do I need one for each instance?

This does not seem to work:

Code: Select all

;==	Where is Everything.ini
;	EVERYTHINGINI=C:\Program Files\Everything\Everything.ini
;	EVERYTHINGINI=J:\Programme\Everything\Everything-Instant.ini
	EVERYTHINGINI=J:\Programme\Everything\Everything.ini
	EVERYTHINGINI=J:\Programme\Everything\Everything-Instant.ini
	EVERYTHINGINI=J:\Programme\Everything\Everything-Instant-2.ini
Is there a way to choose in the context menu between two or more programs to open a file with?
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Can one assign special programs to special extensions?

Post by therube »

(I didn't read the thread, but...)

You can use -config (command line switch) to specify a particular .ini.

Code: Select all

	-config <filename>
		The filename of the ini file.
You can use Custom Open Commands to (set up an association) & create a hotkey to run a particular program. So you could then open .jpg with say Paint, via hotkey (& where the default [Windows] association for .jpg is "picture viewer").
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Can one assign special programs to special extensions?

Post by horst.epp »

In the actual version, you can now use the Open_File_commands
which makes this a lot easier.
Screenshot - 22.08.2023 , 17_52_16.png
Screenshot - 22.08.2023 , 17_52_16.png (23.67 KiB) Viewed 11347 times
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

You can use Custom Open Commands to (set up an association) & create a hotkey to run a particular program. So you could then open .jpg with say Paint, via hotkey (& where the default [Windows] association for .jpg is "picture viewer").
Thank you very much!
In the actual version, you can now use the Open_File_commands
Oops, still have some older version, forgot, the update option does not work even if manually checked.

Looks very complicated (to me).

I have this in that association ini file for example:

Code: Select all

3g2;3gp;3gp2;3gpp;amr;amv;asf;avi;bdmv;bik;d2v;divx;drc;dsa;dsm;dss;dsv;evo;f4v;flc;fli;flic;flv;hdmov;ifo;ivf;m1v;m2p;m2t;m2ts;m2v;m4b;m4p;m4v;mkv;mp2v;mp4;mp4v;mpe;mpeg;mpg;mpls;mpv2;mpv4;mov;mts;ogm;ogv;pss;pva;qt;ram;ratdvd;rm;rmm;rmvb;roq;rpm;smil;smk;swf;tp;tpr;ts;vob;vp6;webm;wm;wmp;wmv="J:\PortableApps\PortableApps\MPC-HCPortable\MPC-HCPortable.exe"

	txt;ini="J:\Programme\Notepad++\notepad++.exe"
How could I get that work with Open_File_commands?

And when I double click a folder in Everything it is opened in FreeCommander. But I do not find such setting / code in the association ini file. So where is that setting?
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Can one assign special programs to special extensions?

Post by tuska »

Reference: These Examples

Menu "Tools" > Options... > Advanced > Show settings containing: type in: open comm -> click on "open_file_commands" > paste this code:

Code: Select all

[{"filter"="*.3g2;*.3gp;*.3gp2;*.3gpp;*.amr;*.amv;*.asf;*.avi;*.bdmv;*.bik;*.d2v;*.divx;*.drc;*.dsa;*.dsm;*.dss;*.dsv;*.evo;*.f4v;*.flc;*.fli;*.flic;*.flv;*.hdmov;*.ifo;*.ivf;*.m1v;*.m2p;*.m2t;*.m2ts;*.m2v;*.m4b;*.m4p;*.m4v;*.mkv;*.mp2v;*.mp4;*.mp4v;*.mpe;*.mpeg;*.mpg;*.mpls;*.mpv2;*.mpv4;*.mov;*.mts;*.ogm;*.ogv;*.pss;*.pva;*.qt;*.ram;*.ratdvd;*.rm;*.rmm;*.rmvb;*.roq;*.rpm;*.smil;*.smk;*.swf;*.tp;*.tpr;*.ts;*.vob;*.vp6;*.webm;*.wm;*.wmp;*.wmv","command"="$exec(\"J:\\PortableApps\\PortableApps\\MPC-HCPortable\\MPC-HCPortable.exe\" \"%1\")"},{"filter"="*.txt;*.ini","command"="$exec(\"J:\\Programme\\Notepad++\\notepad++.exe\" \"%1\")"}]
then click on buttons "Apply" and "OK".

Option1 - only MPC-HCPortable.exe:

Code: Select all

[{"filter"="*.3g2;*.3gp;*.3gp2;*.3gpp;*.amr;*.amv;*.asf;*.avi;*.bdmv;*.bik;*.d2v;*.divx;*.drc;*.dsa;*.dsm;*.dss;*.dsv;*.evo;*.f4v;*.flc;*.fli;*.flic;*.flv;*.hdmov;*.ifo;*.ivf;*.m1v;*.m2p;*.m2t;*.m2ts;*.m2v;*.m4b;*.m4p;*.m4v;*.mkv;*.mp2v;*.mp4;*.mp4v;*.mpe;*.mpeg;*.mpg;*.mpls;*.mpv2;*.mpv4;*.mov;*.mts;*.ogm;*.ogv;*.pss;*.pva;*.qt;*.ram;*.ratdvd;*.rm;*.rmm;*.rmvb;*.roq;*.rpm;*.smil;*.smk;*.swf;*.tp;*.tpr;*.ts;*.vob;*.vp6;*.webm;*.wm;*.wmp;*.wmv","command"="$exec(\"J:\\PortableApps\\PortableApps\\MPC-HCPortable\\MPC-HCPortable.exe\" \"%1\")"}]
Option2 - only notepad++.exe: (A double click in Everything on .txt or .ini file opens this file in notepad++).

Code: Select all

[{"filter"="*.txt;*.ini","command"="$exec(\"J:\\Programme\\Notepad++\\notepad++.exe\" \"%1\")"}]
Probably because of blanks in the path, I could NOT use this setting - please help...:

Code: Select all

[{"filter"="*.mp4;*.mov","command"="$exec(\"C:\\Program Files (x86)\\K-Lite Codec Pack\\MPC-HC64\\mpc-hc64.exe\" \"%1\")"}]
Error message wrote:"C:\Program Files (x86" could not be found. Make sure you have entered the name correctly and repeat the process.
EDIT:

Code: Select all

[{"filter"="*.mp4;*.mov","command"="$exec(\"C:\\Program Files $(x86$)\\K-Lite Codec Pack $\\MPC-HC64\\mpc-hc64.exe\" \"%1\")"}]
This code works! Please check it anyway. Thank you!
Biff wrote: Tue Aug 22, 2023 6:50 pm And when I double click a folder in Everything it is opened in FreeCommander.
But I do not find such setting / code in the association ini file. So where is that setting?
Menu "Tools" > Options... > Context Menu: Open (Folders)
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Super, thank you very much! Managed to do all that.

So I have different programs to open here. And each one opens correctly. Is there a way to make this, the code a bit clearer somehow (for next editing / adding programs)?

Code: Select all

[{"filter"="*.3g2;*.3gp;*.3gp2;*.3gpp;*.amr;*.amv;*.asf;*.avi;*.bdmv;*.bik;*.d2v;*.divx;*.drc;*.dsa;*.dsm;*.dss;*.dsv;*.evo;*.f4v;*.flc;*.fli;*.flic;*.flv;*.hdmov;*.ifo;*.ivf;*.m1v;*.m2p;*.m2t;*.m2ts;*.m2v;*.m4b;*.m4p;*.m4v;*.mkv;*.mp2v;*.mp4;*.mp4v;*.mpe;*.mpeg;*.mpg;*.mpls;*.mpv2;*.mpv4;*.mov;*.mts;*.ogm;*.ogv;*.pss;*.pva;*.qt;*.ram;*.ratdvd;*.rm;*.rmm;*.rmvb;*.roq;*.rpm;*.smil;*.smk;*.swf;*.tp;*.tpr;*.ts;*.vob;*.vp6;*.webm;*.wm;*.wmp;*.wmv","command"="$exec(\"J:\\PortableApps\\PortableApps\\MPC-HCPortable\\MPC-HCPortable.exe\" \"%1\")"}{"filter"="*.txt;*.ini","command"="$exec(\"J:\\Programme\\Notepad++\\notepad++.exe\" \"%1\")"}{"filter"="*.odt;*.ott;*.docx;*.doxt;*.doc;*.dot","command"="$exec(\"J:\\PortableApps\\PortableApps\\LibreOfficePortable\\LibreOfficeWriterPortable.exe\" \"%1\")"}{"filter"="*.ani;*.bmp;*.gif;*.ico;*.jpe;*.jpeg;*.jpg;*.pcx;*.png;*.psd;*.tga;*.tif;*.tiff;*.wmf;*.cr2","command"="$exec(\"J:\\Programme\\XnViewMp\\xnviewmp.exe\" \"%1\")"}{"filter"="*.ods","command"="$exec(\"J:\\PortableApps\\PortableApps\\LibreOfficePortable\\LibreOfficeCalcPortable.exe\" \"%1\")"}{"filter"="*.pdf","command"="$exec(\"J:\\Programme\\PDF-XChange Editor Plus\\PDF-XChange Editor.exe\" \"%1\")"}{"filter"="*.scrivx","command"="$exec(\"C:\\Program Files\\Scrivener3\\Scrivener.exe\" \"%1\")"}{"filter"="*.7z;*.ace;*.arj;*.bz2;*.cab;*.gz;*.gzip;*.r00;*.r01;*.r02;*.r03;*.r04;*.r05;*.r06;*.r07;*.r08;*.r09;*.r10;*.r11;*.r12;*.r13;*.r14;*.r15;*.r16;*.r17;*.r18;*.r19;*.r20;*.r21;*.r22;*.r23;*.r24;*.r25;*.r26;*.r27;*.r28;*.r29;*.rar;*.tar;*.tgz;*.z;*.zip","command"="$exec(\"J:\\Programme\\WinRar\\WinRAR Portable.exe\" \"%1\")"}]
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Can one assign special programs to special extensions?

Post by tuska »

2Biff
Just out of interest:

Have you really tested all your definitions?
I did not find the ',' comma as a separator between the individual programmes with you -> ..."},{"filter"=... --> Example
Furthermore, a path with spaces did not work for me - I had to add '$' characters, e.g. for C:\Program Files $(x86$).

EDIT:
FROM: C:\Program Files $
TO:     C:\Program Files $(x86$)
Last edited by tuska on Thu Aug 24, 2023 12:23 pm, edited 1 time in total.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Can one assign special programs to special extensions?

Post by tuska »

tuska wrote: Wed Aug 23, 2023 9:39 am I did not find the ',' comma as a separator between the individual programmes with you -> ..."},{"filter"=... --> Example
Furthermore, a path with spaces did not work for me - I had to add '$' characters, e.g. for C:\Program Files $(x86$).
I have carried out further tests on this topic.

Options - 1.5.0.1355a (x64) > Advanced > open_file_commands - each separate individual entry

Code: Select all

[{"filter"="*.psd","command"="$exec(\"C:\\Program Files\\IrfanView_64bit\\i_view64.exe\" \"%1\")"}]
[{"filter"="*.mp4;*.mov","command"="$exec(\"C:\\Program Files $(x86$)\\K-Lite Codec Pack\\MPC-HC64\\mpc-hc64.exe\" \"%1\")"}]
[{"filter"="*.txt;*.ini","command"="$exec(\"C:\\totalcmd\\Tools\\Notepad++\\notepad++.exe\" \"%1\")"}]
Options - 1.5.0.1355a (x64) > Advanced > open_file_commands - combination of the above entries

Code: Select all

[{"filter"="*.psd","command"="$exec(\"C:\\Program Files\\IrfanView_64bit\\i_view64.exe\" \"%1\")"}{"filter"="*.mp4;*.mov","command"="$exec(\"C:\\Program Files $(x86$) \\K-Lite Codec Pack\\MPC-HC64\\mpc-hc64.exe\" \"%1\")"}{"filter"="*.txt;*.ini","command"="$exec(\"C:\\totalcmd\\Tools\\Notepad++\\notepad++.exe\" \"%1\")"}]
This example works also WITHOUT ',' comma as a separator. -> ..."},{"filter"=...

For a folder (folder\) with spaces, it is currently unclear to me when I need the $ character in order to avoid an error message:

Code: Select all

C:\Program Files\	    works
C:\Program Files $(x86$)\   works
C:\Program Files (x86)\     * does NOT work *
K-Lite Codec Pack\ 	    works
____________________________________________________________________________________________________
Test scenario - file extension .psd

Windows - Settings
Apps > Default Apps > Select default values by file type: .psd ... Adobe Photoshop CS6/Adobe Photoshop Image 13
Double-click on .psd file in Everything or Windows Explorer opens image in Photoshop.

IrfanView (64-bit) - Place of installation
C:\Program Files\IrfanView_64bit\i_view64.exe

Everything - Advanced: open_file_commands
[{"filter"="*.psd","command"="$exec(\"C:\\Program Files\\IrfanView_64bit\\i_view64.exe\" \"%1\")"}]
Double-click on .psd file in Everything opens image in IrfanView (64-bit).

Total Commander 11.01 - Menu "Files" > Internal Associations (Total Commander Only)...
*.psd ... "%COMMANDER_PATH%\Tools\IrfanView-portable-64bit\IrfanView\i_view64.exe" "%1"
Double-click on .psd file in Total Commander opens image in IrfanView (64-bit).

Paths may need to be adjusted.
______________________________________________________
Windows 11 Pro (x64) Version 22H2 (OS build Build 22621.2215)
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Have you really tested all your definitions?
Yes, as far as I remember I tried to open in Everything for each program at least one (so testing was not very intensively) file extension and everything worked. I just tried again, no error.
I did not find the ',' comma as a separator between the individual programmes with you -> ..."},{"filter"=... --> Example
Furthermore, a path with spaces did not work for me - I had to add '$' characters, e.g. for C:\Program Files $(x86$).
So then it seems to be strange it is working here.
For a folder (folder\) with spaces, it is currently unclear to me when I need the $ character in order to avoid an error message:
May be just always use it if there is no other drawback.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Can one assign special programs to special extensions?

Post by tuska »

2Biff
Thank you for your answer.
After my extended tests, I also found that the code should work for you.
Biff wrote: Thu Aug 24, 2023 3:08 pm
... Furthermore, a path with spaces did not work for me - I had to add '$' characters, e.g. for C:\Program Files $(x86$).
So then it seems to be strange it is working here.
Then it must have been a different example with you.
The code you posted here in the forum did NOT(!) have this path: C:\Program Files (x86)\.
Biff wrote: Thu Aug 24, 2023 3:08 pm
For a folder (folder\) with spaces, it is currently unclear to me when I need the $ character in order to avoid an error message:
May be just always use it if there is no other drawback.
Well, I will definitely not do that now after my additional tests (that would only be unnecessary additional work in such a case).
The only case where I currently need $ characters is the path C:\Program Files (x86)\ --> ...\C:\\Program Files $(x86$)\\... .
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

After my extended tests, I also found that the code should work for you.
Many thanks for testing! Must be the first time code of mine works.
The code you posted here in the forum did NOT(!) have this path: C:\Program Files (x86)\.
Yes, the only program I have on C: to be opened a
Yes, the only program I have at the moment on C: in which to open files via Everything or otherwise: C:\Program Files\Scrivener3\Scrivener.exe
The only case where I currently need $ characters is the path C:\Program Files (x86)\ --> ...\C:\\Program Files $(x86$)\\... .
OK, yes, that sounds odd.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Can one assign special programs to special extensions?

Post by tuska »

One more example

IrfanView (32 bit) - Place of installation
C:\Program Files (x86)\IrfanView\i_view32.exe

Everything - Advanced: open_file_commands

Code: Select all

[{"filter"="*.psd","command"="$exec(\"C:\\Program Files (x86$)\\IrfanView\\i_view32.exe\" \"%1\")"}]
Double-click on .psd file in Everything opens image in IrfanView (32 bit).

\"C:\\Program Files (x86$) <-- Currently, only 1 $ sign is required.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

OK, I understand this is actually good, but using $ is irritating, respectively the question is under which circumstances it, if at all (but obviously it has to be), should be used.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

To my best of knowledge, only for (, ) and $

That is because ( and ) are part of the syntax too and need a leading $ to indicate that a literal ( or ) is meant.
And as the $ is used as the indiicator, a literal $ needs special treatment too.

So:

Code: Select all

( => $(
) => $)
$ => $$
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Can one assign special programs to special extensions?

Post by tuska »

NotNull wrote: Fri Aug 25, 2023 6:51 pm To my best of knowledge, only for (, ) and $

That is because ( and ) are part of the syntax too and need a leading $ to indicate that a literal ( or ) is meant.
And as the $ is used as the indicator, a literal $ needs special treatment too.

So:

Code: Select all

( => $(
) => $)
$ => $$
Thank you for your explanations!
Post Reply