Everything in Windows ContextMenu

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
tytn
Posts: 10
Joined: Wed Dec 14, 2016 7:13 pm

Everything in Windows ContextMenu

Post by tytn » Thu Nov 08, 2018 9:18 am

Which commandline option i must take for right click (context menu) on file, to search the file name in Everything over all drives?
When i take "Everything.exe -name-part "%1"", search Everything only the exactly right filenames. I want search not only excatly "testfile.txt", but also want find "testfile.txt.txt" and "test2-testfile.txt.bak", etc., over all drives.

thx

void
Site Admin
Posts: 4193
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything in Windows ContextMenu

Post by void » Fri Nov 09, 2018 5:55 am

Please try changing your Everything command line to:
Everything.exe -search "%1"

/support/everything/command_line_options/#-search

tytn
Posts: 10
Joined: Wed Dec 14, 2016 7:13 pm

Re: Everything in Windows ContextMenu

Post by tytn » Fri Nov 09, 2018 7:43 am

Everything.exe -search "%1" returns the complete path for search. I need/want only the Filename.
When i try "Everything.exe" -search nopath: "%1" -filter "Everything"" gives Error: "... could not open File ..."
My Everything Version is 1.4.1.921 (x64).

void
Site Admin
Posts: 4193
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything in Windows ContextMenu

Post by void » Fri Nov 09, 2018 7:48 am

Please try:
Everything.exe -search nopath:"%1"

tytn
Posts: 10
Joined: Wed Dec 14, 2016 7:13 pm

Re: Everything in Windows ContextMenu

Post by tytn » Fri Nov 09, 2018 8:54 am

grrr, blank sign between nopath: and percent ...

Everything.exe -search nopath:"%1" also give the complete path for search return.

vanisk
Posts: 10
Joined: Sat Oct 27, 2018 11:33 am

Re: Everything in Windows ContextMenu

Post by vanisk » Fri Nov 09, 2018 10:39 am

I never tried this. But out of curiosity tried creating shell extension to achieve what tytn is asking for.

tried "Everything.exe -name-part "%1*" which opens everything with search text
nopath:wfn:"testfile.txt*"
which in turn search for "testfile.txt" and "testfile.txt.txt" but not "test2-testfile.txt.bak"

Also i seek for alternate to %1 [like %~n1 DOS] to only send filename without extension to everything and to use -s, but can't find a straightforward method. My guess is to create a intermediate script to parse the given filename with path [from context menu] and to send only filename w/o extension to Everything.exe -s.

tytn
Posts: 10
Joined: Wed Dec 14, 2016 7:13 pm

Re: Everything in Windows ContextMenu

Post by tytn » Fri Nov 09, 2018 11:58 am

This is what I'm looking for.
I need a Everything Command Line Options to dissolve to "nopath:nowfn:" or "nopath:noww:"

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

Re: Everything in Windows ContextMenu

Post by NotNull » Sun Nov 11, 2018 3:31 pm

vanisk wrote:
Fri Nov 09, 2018 10:39 am
Also i seek for alternate to %1 [like %~n1 DOS] to only send filename without extension to everything
I read this thread 3 times and still didn't understand the question. Your %~n1 finally made everything clear.
For other people reading this:
If you use the context menu for a file, it will pass "C:\path\my file.txt" to the associated program.
@tytn wants it to pass "my file.txt" (or "my file"; not sure)


In the past I did quite a few experimnts with context menu variables. Conclusion: there is no such thing as %~n1. Unfortunately ...

Your alternative - passing the "%1" to a CMD script to get just the filename out of it - is a good solution.
But there is an alternative: adding multiple commands to the registry.

Instructions
  • Decide which version you like
  • Save the corresponding code as WhereElse.reg somewhere on your system
  • Optional: change the path towhere your Everything.exe is
  • Double-click WhereElse.reg
  • Done
Now you have a "Where else?" in the context menu of your files.


Version 1
If the selected file is "c:\path\My File.txt" and you want to search for "My File"

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\*\Shell\Where else?\command]
@="cmd.exe /c for %%a in (\"%1\") do start \"\" \"c:\\Program Files\\everything\\everything.exe\" -search \"\"\"\"%%~na\"\"\"\""

Version 2
If the selected file is "c:\path\My File.txt" and you want to search for "My File.txt"

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\*\Shell\Where else?\command]
@="cmd.exe /c for %%a in (\"%1\") do start \"\" \"c:\\Program Files\\everything\\everything.exe\" -search \"\"\"\"%%~nxa\"\"\"\""


Note:
- CMD doesn't support passing multiple files to it, so single file only.

void
Site Admin
Posts: 4193
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything in Windows ContextMenu

Post by void » Wed Nov 14, 2018 7:03 am

To make things a little easier, I've added -stem <filename>, -base-name <filename> and -extension <filename> command line options for the next version of Everything

For example:
Everything.exe -stem "c:\foo\bar.txt"
will search for: "bar"

Everything.exe -base-name "c:\foo\bar.txt"
will search for: "bar.txt"

Everything.exe -extension "c:\foo\bar.txt"
will search for: ext:txt

I've also added stem:<filename>, basename:<filename> and extension:<filename> search commands for the next version of Everything

For example, searching for:
stem:<c:\foo\bar.txt>
will search for:
bar

For example, searching for:
basename:<c:\foo\bar.txt>
will search for:
bar.txt

For example, searching for:
extension:<c:\foo\bar.txt>
will search for:
txt

For example, searching for:
strlen:<c:\foo\bar.txt>
will search for:
14

With these search commands you could do something like:
Everything.exe -search "stem:<%1>"

tytn
Posts: 10
Joined: Wed Dec 14, 2016 7:13 pm

Re: Everything in Windows ContextMenu

Post by tytn » Wed Nov 14, 2018 10:30 am

@void You're a treasure :-* :D

Post Reply