Page 1 of 1

Possible to search by file extension using its shortcut?

Posted: Wed Mar 13, 2019 12:49 pm
by burgundy
I sometimes want to search for all PDFs in a particular directory including those PDFs with a shortcut link in that directory.

In other words, can Everything search a directory by file extension in a way that would also include the file extension of a file that a shortcut link points to?

Is it possible to do this?

Re: Possible to search by file extension using its shortcut?

Posted: Thu Mar 14, 2019 3:07 am
by void
Everything can not search for shortcut targets yet.
Something like shortcut-target:*.pdf might be available in the next major version of Everything.

You could try searching for:
"<directory to search>\" ext:pdf;lnk

Note: this will find all pdf and lnk files, where the lnk files may not point to a pdf file.

For example:
"F:\pdf folder\" ext:pdf;lnk

Re: Possible to search by file extension using its shortcut?

Posted: Thu Mar 14, 2019 11:11 am
by tuska
void wrote: Thu Mar 14, 2019 3:07 am ...this will find all pdf and lnk files, where the lnk files may not point to a pdf file. ...
It is also possible to create a link in such a way that the file extension is already visible in the link.
For this I use the file manager Total Commander.

Code: Select all

file.ext -> file.lnk
file.ext -> file.ext.lnk  *)
*) 1. In file "wincmd.ini", section [Configuration], add the following entry: AppendLnk=1
   2. CTRL+SHIFT+F5 in Total Commander creates the link

A search in Everything then brings the following results:

Code: Select all

ext:pdf !<*.pdf *.lnk>	finds file.pdf
ext:pdf|<*.pdf *.lnk>	finds file.pdf AND file.pdf.lnk
<*.pdf *.lnk>		finds file.pdf.lnk

Re: Possible to search by file extension using its shortcut?

Posted: Thu Mar 14, 2019 2:23 pm
by froggie
How about:
.lnk content:pdf


as a starting point

Re: Possible to search by file extension using its shortcut?

Posted: Fri Mar 15, 2019 12:38 am
by vanisk
Can anyone test this file and write instructions (pls)

Re: Possible to search by file extension using its shortcut?

Posted: Fri Mar 15, 2019 10:08 am
by vanisk
This can be accomplished by a bat file or cmdlet (but i'm not good with them. but tried batch file and it takes 2 to 3 seconds every time. So converted it into a .Net prg)
I'm using this prg myself for a long time, but just now added lnk option to it. (I will attach the source code to this prg, after i change dummy variables to some useful names and after adding comment lines)

Now what it does is,
1. If we right click a lnk file and select "Search this type", the prg locates the target file (file that is linked to) and pass the path of the target file and target file extension to Everything
2. If we right click a file (other than lnk)and select "Search this type", the prg pass the path of the file and target file extension to Everything


Before using this...
edit the .reg file (and change path to Everything.exe and path to this prg)
Search_This_Type.jpg
Search_This_Type.jpg (359.36 KiB) Viewed 6918 times

Re: Possible to search by file extension using its shortcut?

Posted: Fri Mar 15, 2019 12:26 pm
by burgundy
tuska wrote: Thu Mar 14, 2019 11:11 am For this I use the file manager Total Commander
.
As an aside, is there any easy way to integrate Everything with Total Commander? I have tried a couple of times in the past but it seemed to get very complicated.

There is an option to use Everything on the Total Commander "Find Files" screen which looks useful.

Re: Possible to search by file extension using its shortcut?

Posted: Fri Mar 15, 2019 2:14 pm
by tuska
burgundy wrote: Fri Mar 15, 2019 12:26 pm
tuska wrote: Thu Mar 14, 2019 11:11 am For this I use the file manager Total Commander
.
As an aside, is there any easy way to integrate Everything with Total Commander? I have tried a couple of times in the past but it seemed to get very complicated.

There is an option to use Everything on the Total Commander "Find Files" screen which looks useful.
Here are some very detailed descriptions for using Everything <=> TC and TC <=> Everything:
https://ghisler.ch/board/viewtopic.php?p=346372#p346372
https://ghisler.ch/board/viewtopic.php?f=3&t=51534