SHA-256 identical to that of the currently selected file

Discussion related to "Everything" 1.5 Alpha.
Post Reply
rgbigel
Posts: 43
Joined: Sun Apr 17, 2011 4:00 pm

SHA-256 identical to that of the currently selected file

Post by rgbigel »

Example Basic Problem: I would like to find all files having a SHA-256 identical to that of the currently selected file of a search result (to be opened in a new search window).

It is probably very simple, but I can not figure out how to extract the (indicated) value of the SHA-256 to plug into a query and execute it. :roll:

It's probably almost too simple to ask, but finding something requires to know the correct terminology. I've been looking for 2 days through all examples... Thanks for any help.

Rolf
void
Developer
Posts: 16897
Joined: Fri Oct 16, 2009 11:31 pm

Re: SHA-256 identical to that of the currently selected file

Post by void »

Everything64.exe -s* sha256:[get-property:"C:\Windows\Notepad.exe",sha256]

From a BAT file, this might look like:

Everything64.exe -s* sha256:[get-property:"%1",sha256]

This will work best if you are indexing SHA256.
If you are not indexing SHA256 information, limit your search to a specific folder, for example:

Everything64.exe -s* parent:C:\Windows sha256:[get-property:"C:\Windows\Notepad.exe",sha256]
or, for subfolders:
Everything64.exe -s* C:\Windows\ sha256:[get-property:"C:\Windows\Notepad.exe",sha256]



[get-property:<filename>,<property-type>]
Everything64.exe -s*



To add this to your right click context menu is a different question.
The easiest is to create a shortcut to a BAT file in %APPDATA%\Microsoft\Windows\SendTo
Right click your file and under Send to, click your BAT file.

-or-

Create your own Everything context menu item.
dedupeit
Posts: 13
Joined: Thu Jul 28, 2022 9:52 pm

Re: SHA-256 identical to that of the currently selected file

Post by dedupeit »

This will work best if you are indexing SHA256.
OMG, how did I not know this was a thing? Amazing!
dedupeit
Posts: 13
Joined: Thu Jul 28, 2022 9:52 pm

Re: SHA-256 identical to that of the currently selected file

Post by dedupeit »

How does indexing work? I'm using Everything to deal with my photos/videos collection and started indexing Media Created, Date Taken and SHA-256. I have a large number of files so initially it took a LONG time to index (understandably). But after some changes to files (deleted a few, moved a few, etc), it seems like it's indexing from scratch again.
horst.epp
Posts: 1453
Joined: Fri Apr 04, 2014 3:24 pm

Re: SHA-256 identical to that of the currently selected file

Post by horst.epp »

dedupeit wrote: Sat Aug 06, 2022 3:32 pm How does indexing work? I'm using Everything to deal with my photos/videos collection and started indexing Media Created, Date Taken and SHA-256. I have a large number of files so initially it took a LONG time to index (understandably). But after some changes to files (deleted a few, moved a few, etc), it seems like it's indexing from scratch again.
It only reindexes under certain conditions.
Are you shure that your Everything database is on a writeable dir ?
dedupeit
Posts: 13
Joined: Thu Jul 28, 2022 9:52 pm

Re: SHA-256 identical to that of the currently selected file

Post by dedupeit »

horst.epp wrote: Sat Aug 06, 2022 3:52 pm It only reindexes under certain conditions.
Are you shure that your Everything database is on a writeable dir ?
Can't think of any reason why it would not be writable
rgbigel
Posts: 43
Joined: Sun Apr 17, 2011 4:00 pm

Re: SHA-256 identical to that of the currently selected file

Post by rgbigel »

For me, re-indexing does not occur in normal activity once it has completed -- yes, it takes a long time at first (over 500000 Files, just jpg's)
Several months ago, re-indexing also happened, but with the more current 1.5a versions it does not.

My solution to the original problem works now, albeit is not very satisfying.

I followed the method given in viewtopic.php?f=4&t=11663&p=46540&hilit=missing#p46537.
Essentially, this adds a (global!) entry to the context menu of the selected file (singular!), launching this query:

command :=cmd /C Everything64.exe -new-window -filter everything -s sha256:[get-property:"%1",sha256]

(Requires obviously that the path variable includes the Everything 1.5 location)

For reasons I do not understand, it does not work without running the cmd-Processor, i.e., this does NOT work for me:

command:= "c:\ program files\everything 1.5a\Everything64.exe" -new-window -filter everything -s sha256:[get-property:"%1",sha256]

A major problem exists however when you try to add the command key, because it is using the (Default) - key, which always comes up as type REG_SZ instead of REG_EXPAND_SZ, but that's required if you want to use "%1". I eventually found a way, but can't explain what is going on there. It would be much simpler if the Key's name was a "normal" key name, the type of which can easily be modified.

This is far from what I really would like: a hotkey to $Exec this query. But as I read it so far, there are only 4 available "slots" in Context menu that have a modifiable $Exec, and there seems to be no way to add any. Also, the keyboard table is not able to access any (added) context menu entry.

Am I wrong?

Rolf
Post Reply