activating a verb with multiple selected files for executing comparison

General discussion related to "Everything".
Post Reply
yakirs
Posts: 4
Joined: Thu Aug 02, 2018 4:43 pm

activating a verb with multiple selected files for executing comparison

Post by yakirs »

I have a verb in my computer for comparing 2 files. It looks something like that:

"C:\Program Files\COMPARE_PROGRAM\compare.exe" "%1" "%2"

I defined a shortcut key in Everything to use this verb.

But when I select 2 files in the results menu and click this shortcut key - it executes 2 different processes, one for each file. And not a single verb for both files.

How can I create a shortcuts key to compare 2 selected files?
void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

Re: activating a verb with multiple selected files for executing comparison

Post by void »

"%1" "%2"
Everything doesn't have this functionality yet.

Everything will call compare.exe twice, only filling out %1.
Windows Explorer should behave the same.

Please try creating a shortcut in sendto folder:
  • Create a shortcut to compare.exe in %AppData%\Microsoft\Windows\SendTo
Right click two files, click SendTo and click Compare, each file should be passed to compare.exe.
Unfortunately, Everything does not have an option to create a keyboard shortcut for sendto shortcuts.

https://stackoverflow.com/questions/182 ... rb-to-an-e
therube
Posts: 4580
Joined: Thu Sep 03, 2009 6:48 pm

Re: activating a verb with multiple selected files for executing comparison

Post by therube »

try creating a shortcut in sendto folder
That should work fine, I'd think.
I do it all the time.

(I'm not comparing the two files, %1 & %2, directly, rather running a command against those two files, outputting results, then comparing the two result files.)

Code: Select all

:: MediaInfo _ command_com line COMPARATOR with CALL to Salamander's File Comparator

@echo	off
set	X_TEMP_PATH=%PATH%
path	%PATH%;C:\DEV\CODECS\MediaInfo_CL\;


set	OUT1=C:\OUT\MI_COMPARE1.TXT
set	OUT2=C:\OUT\MI_COMPARE2.TXT

echo	FILE 1:  >  %OUT1%
echo	%1  >> %OUT1%
echo.   >> %OUT1%
echo	FILE 2:  >  %OUT2%
echo	%2  >> %OUT2%
echo.   >> %OUT2%


:: originally, the above echo were not there, & if for some reason the MI failed,
::       like from a too long PATH, kind of thing
::    both the files ending up with nothing in them, so they would compare as
::    "equal", & they "were", except it was comparing against "nothing" instead
::    of actually returned valid results of the MI command
:: anyhow, MI does have exit codes; 0=success, 1=failure, but for some reason
::    depending on, not sure, file order (which one "first") or whatever, again
::    valid result may not have been given
:: with the echo's, at the least there will be some diffs to the files, so the
::    compare, while still not of relevant data, at least will "not compare" &
::    so will point out diffs, & then it's like, ah, what's going on here
:: so at least you know something is up, instead of "falsely" being told, oh,
::    your files compare, exactly [wrong]


C:\DEV\CODECS\MediaInfo_CL\MediaInfo_CL.exe  %1  >>  %OUT1%
:: if	errorlevel 1 echo FILE 1: MEDIAINFO DETECTED FAILURE,  %1  >>  %OUT1%
:: set	errorlevel=

C:\DEV\CODECS\MediaInfo_CL\MediaInfo_CL.exe  %2  >>   %OUT2%
if	errorlevel 1 echo FILE 2: MEDIAINFO DETECTED FAILURE,  %2  >>  %OUT2%
:: for some reason, these (TWO) errorlevel checks were not always returning
:: expected results, so i changed to the 'echo' method (above) which "forces"
:: diffs into %OUT_%, so a failure won't compare equally


"C:\WLIB\Servant Salamander 308\plugins\filecomp\fcremote.exe"  %OUT1%   %OUT2%

set	PATH=%X_TEMP_PATH%
set	X_TEMP_PATH=
Post Reply