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

Can one assign special programs to special extensions?

Post by Biff »

Can one assign special programs to special extensions (e.g. jpg to XnView portable, so jpg files shall and will be opened with XnView) to be opened by double mouse clicking a file in the result list?
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: Can one assign special programs to special extensions?

Post by horst.epp »

Biff wrote: Sat Jan 04, 2020 10:36 pm Can one assign special programs to special extensions (e.g. jpg to XnView portable, so jpg files shall and will be opened with XnView) to be opened by double mouse clicking a file in the result list?
Thats a job for an file manager like Total commander which does support multiple context menu entries
and also integrates Everything search.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Well, well, yes, yes, but I do not use that program and I would like to do it with Everything.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Can one assign special programs to special extensions?

Post by therube »

so jpg files shall and will be opened with XnView
Are you saying only when opened from within Everything, or system-wide?
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Are you saying only when opened from within Everything
Yes.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Biff wrote: Sat Jan 04, 2020 10:36 pm Can one assign special programs to special extensions (e.g. jpg to XnView portable, so jpg files shall and will be opened with XnView) to be opened by double mouse clicking a file in the result list?
Yes, that is possible. As a matter of fact: I have this already working that way.
But it is part of something bigger, so I have to "isolate" the right parts.
Will come back to you....


A question, though: Why?
I'm asking because this might be a case where you are "fighting the symptoms" instead of "fighting the problem" (I hope you understand, as I can't explain it any better than this :-))
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Yes, that is possible. As a matter of fact: I have this already working that way.
But it is part of something bigger, so I have to "isolate" the right parts.
Will come back to you....
Many thanks. It sounds like it might bei quite complicated and causing much work. If so, it will be better to not to do it. I had hoped, there might be an option or so to do such.
A question, though: Why?
I'm asking because this might be a case where you are "fighting the symptoms" instead of "fighting the problem" (I hope you understand, as I can't explain it any better than this :-))
So why does Win not automatically link the standard programs? The most of my programs (like Everything) are portable and so they usually would not be linked automatically by Win, I would have to mannually link them or use a program I to link the extensions with programs. If I used another Win or reinstalled Win I would have to do it again with Win (not with such a linking program or Everything). I have in FreeCommander linked some programs (like I would do also with Everything), so they open when I e.g. double click a file.

Yes, actually one should use a single program (like I normally do) to link all of the programs one uses, but just setting some links in Everything (like I did with FreeCommander) is not bad as well...I assume.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Well, that is a very good reason. That is why I wrote this in the first place as I run most programs portable too :D
Biff wrote: Mon Jan 06, 2020 1:15 pm I had hoped, there might be an option or so to do such.
No, there isn't such an option.
Biff wrote: Mon Jan 06, 2020 1:15 pm It sounds like it might bei quite complicated and causing much work
Turned out to be rather straightforward. Most "work" came from making this "human friendly" and testing.

Anyway:

Installation
  • Extract the attached zipfile to some folder
  • Open EverythingFileAssociations.ini in a texteditor
  • Specify where Everything.ini can be found
  • Specify your file associations (INI contains examples)
  • Save ini file
  • Run EverythingFileAssociations.cmd
  • Press i
  • Done

Usage

From now on, double-clicking a file (or ENTER) in Everything will cause the file to be opened with the program you specified in the INI.
If some file extension is *not* specified in the INI, it will be started as usual (= let Explorer handle it).


Uninstall
  • Run EverythingFileAssociations.cmd
  • Press R
  • Done
Attachments
EverythingFileAssociations_2020-01-07.zip
(1.88 KiB) Downloaded 720 times
Last edited by NotNull on Tue Jan 07, 2020 8:17 pm, edited 3 times in total.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Can one assign special programs to special extensions?

Post by therube »

Rather ingenious if I do say so (not that I'm totally understanding what's going on).

Does XP not have CHOICE?
I had a version from Win98, & with that had to change the .cmd a bit.

Code: Select all

	choice /c:IRQ /N  "Enter your choice : "
---

"In Windows NT 4, 2000 and XP, CHOICE is no longer a part of the standard distribution. It is, however, available as part of the Windows NT 4 Resouce Kit."
https://www.robvanderwoude.com/choice.php
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

therube wrote: Mon Jan 06, 2020 4:45 pm Rather ingenious if I do say so (not that I'm totally understanding what's going on).
Thanks! It is mostly the idea. The core code is 6 or 7 lines. And that does "everything".
Basic idea:
- Don't send file/program to Explorer, but to EverythingFileAssociations
- Check file extension of the file.
- If file extension is defined in settings, start the matching program (with filename as parameter)
- If not defined in settings: give file back to Explorer to handle it.


If you don't have CHOICE.exe, you can replace the installation part with:
  • Start Everything
  • Go to Menu:Tools > Options > General > Context Menu
  • Click on Open (Files)
  • In the Command box, enter

    Code: Select all

    $exec("C:\path to\EverythingFileAssociations.cmd" "%1")
  • [OK]

Uninstall:
  • In the Command box, remove all content
  • [OK]
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Turned out to be rather straightforward. Most "work" came from making this "human friendly" and testing.
Thank you very much!
Installation

Extract the attached zipfile to some folder
Run EverythingFileAssociations.cmd
Press i (+ ENTER)
Done
Sorry, I am missing anything. I double click this file "EverythingFileAssociations.cmd", downloaded in your zip file. When I press i (without ENTER after) this is shown:
Image

May be I have to move it to the Everything folder and replace the original file?
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Can one assign special programs to special extensions?

Post by therube »

EverythingFileAssociations.cmd & EverythingFileAssociations.ini should be in the same directory as Everything.exe.

Then, in EverythingFileAssociations.ini, the path/name to Everything .ini needs to be set correctly.
Likewise the file extension associations & the path/name to the programs you want to handle the particular file type.


So if Everything.ini is in j:/programme/everything 123/ (it might not be), you need to point EverythingFileAssociations.ini to the correct location.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Sorry again, this is shown again:
Image

The 2 files are here now:
Image
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: Can one assign special programs to special extensions?

Post by horst.epp »

Biff wrote: Mon Jan 06, 2020 6:37 pm Sorry again, this is shown again:
...
The 2 files are here now:
Image
Please show us the content of your EverythingFileAssociations.ini
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, I assume, you don't mean the EverythingFileAssociations.ini I downloaded from you. But I cannot find any other. Which one is meant? Sorry again for my bad understanding.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

I posted an updated version of EverythingFileAssociations (replacing the first version).
It contains some extra checks.
Please replace the previous version with this one.

@biff:
Did you follow the Configuration steps?
It is very important to define the path to your Everything.ini
You define that in EverythingFileAssociations.ini
Just double-click it to edit.

The new version checks if EVERYTHINGINI is defined and points to a "good" Everything.ini.
So start by installing the new version.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Did you follow the Configuration steps?
No, I didn*t because the installation fails. The "Configuration" has to be done before or while the "Installation", I assume, not after. Thought it had to be done step after step. Sorry for the confusion.

This is shown now, there is no chance to enter ENTER after pressing "i", so I guess, there is anything wrong:
Image

Content of the association file:

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 ""
;	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  
;	
;	If you have multiple extensions using the same program, define them like this:
;	  .JPG="c:\tools\voidimageviewer.exe"
;	  .GIF=!.JPG!
;	That way, .jpg files will be opened with voidimageviewer too.


	.JPG="J:\Programme\XnViewMP\xnviewmp.exe"
	.INI="J:\Programme\Notepad++\notepad++.exe"
	.GIF=!.JPG!

How could one link all kind of image extensions to that path (so I just could copy the image extension from here
Image
and simply add them to that line): .JPG="J:\Programme\XnViewMP\xnviewmp.exe"
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Biff wrote: Mon Jan 06, 2020 8:03 pm No, I didn*t because the installation fails. The "Configuration" has to be done before or while the "Installation", I assume, not after. Thought it had to be done step after step. Sorry for the confusion.
No, that is my bad! Instructions were not clear (and even wrong in some places).
Will change them.
You did everything right.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Well, or just my brain...working with low-power or so...

Thank you!
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Biff wrote: Mon Jan 06, 2020 8:03 pm How could one link all kind of image extensions to that path (so I just could copy the image extension from here
and simply add them to that line): .JPG="J:\Programme\XnViewMP\xnviewmp.exe"
Would you prefer a version where you could specify this in the INI file? :

Code: Select all

ani;bmp;gif;ico;jpe;jpeg;jpg;pcx;png;psd;tga;tif;tiff;wmf="J:\Programme\XnViewMP\xnviewmp.exe"
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Yes, that would be great. But I didn't get it working yet.

After adding a new extensio / program to the new ini file does one have to restart Everything or anything else?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

No, restarting should not be needed. The settings are read when you double-click a file.
What happens when you double-click a JPG file? Does XnView start?
(make sure the volume where this file is on is available/ online)


In the meantime I did a rewrite to support this new way of defining associations.
Works here, but needs a little more testing.
Will post it later (probably tomorrow)
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

What happens when you double-click a JPG file? Does XnView start?
No, some Win program starts (like it did before changing an ini file / installing), the standard program of Win, I assume. Looks like that, cannot find a name or such:
Image
(make sure the volume where this file is on is available/ online)
Yes, I do. The content of the association file:

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 ""
;	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  
;	
;	If you have multiple extensions using the same program, define them like this:
;	  .JPG="c:\tools\voidimageviewer.exe"
;	  .GIF=!.JPG!
;	That way, .jpg files will be opened with voidimageviewer too.


	.JPG="J:\Programme\XnViewMP\xnviewmp.exe"
	.INI="J:\Programme\Notepad++\notepad++.exe"

	.GIF=!.JPG!

In the meantime I did a rewrite to support this new way of defining associations.
That is great! Thank you!
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Does it not work with too long pathes? This message is shown, when I try to open a jpg file with a path with 310 characters and other jpg files with a too long path:
Image
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Biff wrote: Tue Jan 07, 2020 11:22 am Does it not work with too long pathes?
No, unfortunately CMD has very limited support for long paths.
That would mean a rewrite in another (scripting) language that supports "long paths".
Shouldn't be too hard, but I am not going to do that.

I uploaded a new version (EverythingFileAssociations_2020-01-07.zip). Not tested as much a wanted, due to lack of time, but should work.
To install, follow the steps described earlier.
Notice the new ini file structure; you have to configure your associations again.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Thank you very much for the new version, great!

I must have done any mistake, the defined programs do not start, instead the standard Win programs start. What might be the mistake:

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


	bmp;gif;ico;jpeg;jpg;png;tif;tiff="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;cmd;ps1="J:\Programme\Notepad++\notepad++.exe"


;==
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Did you:
- In File Explorer, double-click EverythingFileAssociations.cmd
- Press i

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

Re: Can one assign special programs to special extensions?

Post by Biff »

Yes, yes, I did.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

- Start Everything
- Go to Menu:Tools > Options > General > Context Menu
- Click on Open (Files)

What is shown in the Command box ?

If it still says $exec("%1") instaed of something like $exec("x:\path to\EverythingFileAssociations.cmd" "%1") ":

Make sure Everything is not running:
- rightclick the Everything icon in the systemtray and choose Exit

Repeat the installatiuon steps:
- In File Explorer, double-click EverythingFileAssociations.cmd
- Press i

Some other questions:
Are you running Everything as administrator? 32 or 64-bit Everything?
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

- Start Everything
- Go to Menu:Tools > Options > General > Context Menu
- Click on Open (Files)

What is shown in the Command box ?
This:
Image

Code: Select all

$exec("J:\Programme\Everything\EverythingFileAssociations.cmd" "%1")
Repeat the installatiuon steps:
- In File Explorer, double-click EverythingFileAssociations.cmd
- Press i
I already did it a few times, now once again.
Are you running Everything as administrator?
How could I find out? When I start Everythin as Admin it makes no different regarding the behaviour. Sorry, may be I gave a wrong information, When I click a jpg file in the result list Win Explorer opens, with this window:
Image

When I click an mkv file some Win video player opens.

64-bit Everything I use.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Thanks for all the information (and experiments).
Enough information for now .. will sleep on it.


What do you think about remote logging in on your system for further debugging tomorrow evening (through a TeamViewer session or similar). That should help a lot in fixing this ...
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Thanks for all the information (and experiments).
Enough information for now .. will sleep on it.
No, no, I have to say thank you for your efforts and the versions at all. Alright, good night.
What do you think about remote logging in on your system for further debugging tomorrow evening (through a TeamViewer session or similar). That should help a lot in fixing this ...
Well, yes, I am not quite sure at the moment.

I just have tried the old ini (from yesterday or so) version (without changing anything else), double clicking a jpg file in the result list, that works:

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 ""
;	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  
;	
;	If you have multiple extensions using the same program, define them like this:
;	  .JPG="c:\tools\voidimageviewer.exe"
;	  .GIF=!.JPG!
;	That way, .jpg files will be opened with voidimageviewer too.


	.JPG="J:\Programme\XnViewMP\xnviewmp.exe"
	.INI="C:\Tools\Notepad++\notepad++.exe"
	.GIF=!.JPG!

NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

I had mail contact with @Biff about this, to debug what's going on (no use polluting the forum with that..).

Turns out he has a setting that causes all programs started from any CMD script to be run as administrator.
After implementing a workaround for this (highly unusual) setting, things looked much better, but the script is still allergic to long paths (>260 chars) and %% in file/foldernames.

I will not fix this in the near future (it has served me well for almost a year).
So if anyone decides to use it: keep that in mind.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

So one each time after shutting down the computer has to run the cmd file again and enter "i", if I see it right. Is there a method to have not to do it? So that can be done automatically?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Biff wrote: Wed Feb 19, 2020 3:03 pm So one each time after shutting down the computer has to run the cmd file again and enter "i", if I see it right.
Why do you think that? It should be a one time setting.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Because it didn't work anymore, so I thought it might have stopped working because of a restart. And I ran the cmd file again.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Strange ... Not working at all? No error message? In that case: most likely cause is a new Everything.ini file that is missing the special open_file_command2= setting.
Biff wrote: Wed Feb 19, 2020 10:30 pm And I ran the cmd file again.
is it now functioning again?
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Strange ... Not working at all? No error message?
Yes to both.
most likely cause is a new Everything.ini file that is missing the special open_file_command2= setting.
I didn't update Everything or change anything intentionally.

Yes, it works like it did before.

OK, so I just will leave it like it is and see what will happen.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

May be EverythingFileAssociations.cmd could be started automatically before Everything starts each time and this
Image

would not need a confirmation, instead the choice "I" would be executed?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Does that imply that these file association settings get lost every time you exit Everything?
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

When exiting Everything they are kept, only when I shut down the Notebook and start it again they are lost like it seems.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

To find out what is going on, could you try the following:
  • Start Everything
  • Enter this in the search bar (and press ENTER):
    /open_file_command2
  • Check the status bar
Does it say "open_file_command2=" or open_file_command2=$exec("x:\path to\EverythingFileAssociations.cmd" "%1")
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

No, this is shown:

Image
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Sorry, I should have mentioned that it is only shown for a couple of seconds in the status bar.
You should see *something* at least.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

No, no, my failure anyway, I missed to press ENTER, sorry.

Yes, this is shown:
Image
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

Then it should be working, unless there is something wrong with the INI file or if there is no "J:\Programme\Everything\EverythingFileAssociations.cmd".

Assuming the .cmd is in place, could you show me the content of your "J:\Programme\Everything\EverythingFileAssociations.ini"?
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

Then it should be working, unless there is something wrong with the INI file or if there is no "J:\Programme\Everything\EverythingFileAssociations.cmd".
Does that mean the cmd file has to be in this folder and in no other one to work?

Yes, of course. Cannot add that file as an attachment here.

Code: Select all

;==	Where is Everything.ini
;	EVERYTHINGINI=C:\Program Files\Everything\Everything.ini
	EVERYTHINGINI=C:\Tools\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


	bmp;gif;ico;jpeg;jpg;png;tif;tiff="c:\tools\voidimageviewer.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="C:\Tools\vlc\vlc.exe"
	txt;ini;cmd;ps1="C:\Tools\Notepad++\notepad++.exe"


;==
NotNull
Posts: 5461
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 9:52 pm Does that mean the cmd file has to be in this folder and in no other one to work?
It can be in any folder, as long as the INI and CMD are in the same folder.

This stands out in your INI:

Code: Select all

	EVERYTHINGINI=C:\Tools\Everything\Everything.ini
Is your Everything.ini in this folder?



The programs you want to start are all in C:\Tools too?

"c:\tools\voidimageviewer.exe"
"C:\Tools\vlc\vlc.exe"
"C:\Tools\Notepad++\notepad++.exe"
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Can one assign special programs to special extensions?

Post by Biff »

No, it is not. Sorry, obviously I have missed editing it.

Now the ini loks like this:

Code: Select all

;==	Where is Everything.ini
;	EVERYTHINGINI=C:\Program Files\Everything\Everything.ini
	EVERYTHINGINI=J:\Programme\Everything - Weiteres\EverythingFileAssociations\EverythingFileAssociations.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


	bmp;gif;ico;jpeg;jpg;png;tif;tiff="c:\tools\voidimageviewer.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="C:\Tools\vlc\vlc.exe"
	txt;ini;cmd;ps1="C:\Tools\Notepad++\notepad++.exe"


;==
Located here: J:\Programme\Everything - Weiteres\EverythingFileAssociations
Image
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Can one assign special programs to special extensions?

Post by NotNull »

EVERYTHINGINI=J:\Programme\Everything - Weiteres\EverythingFileAssociations\EverythingFileAssociations.ini

EVERYTHINGINI= should point at your Everything.ini, and not your EverythingFileAssociations.ini.
If you are running Everything portable too, it is located in the folder where your Everything.exe is.


Don't forget to also check these lines in your EverythingFileAssociations.ini. They all point to programs in C:\Tools:

Code: Select all

bmp;gif;ico;jpeg;jpg;png;tif;tiff="c:\tools\voidimageviewer.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="C:\Tools\vlc\vlc.exe"
txt;ini;cmd;ps1="C:\Tools\Notepad++\notepad++.exe"

And that was it for today. To be continued (tomorrow ..)
Post Reply