Compare 2 file lists with each other?

Discussion related to "Everything" 1.5 Alpha.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Compare 2 file lists with each other?

Post by Biff »

Menu "Help" > Check for Updates...
Yesyes, but that does not work here. Somehow an automatic update notification / signal or so would be good. Or better yet, an automatic updating.
but to be on the safe side I would still visit the Everything Forum often and keep an eye out for updates. ;)
So "Check for Updates" or else seems to be not save (enough) or less save (for whatever reason). OK, so better visiting this forum every day or more often to not to miss an update.

OK, many thanks!
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Compare 2 file lists with each other?

Post by NotNull »

Change the search of the diff filter to the following to make this work again.

Code: Select all

#if:<#stricmp:<#element:<$param:,;,1>,#element:<$param:,;,2>>==0,"!">       file:   regex:[regex-escape:[element:$param:,;,1]](.*$) | regex:[regex-escape:[element:$param:,;,2]](.*$)    unique:regmatch1;size;dm
Will update the first appearance of this too. That way people don't need to read all messages.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Compare 2 file lists with each other?

Post by Biff »

Thank you very much!

So it's like this now:
Image
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Compare 2 file lists with each other?

Post by tuska »

NotNull wrote: Sun Apr 21, 2024 7:34 pm Change the search of the diff filter to the following to make this work again.

Code: Select all

#if:<#stricmp:<#element:<$param:,;,1>,#element:<$param:,;,2>>==0,"!">       file:   regex:[regex-escape:[element:$param:,;,1]](.*$) | regex:[regex-escape:[element:$param:,;,2]](.*$)    unique:regmatch1;size;dm
Will update the first appearance of this too. That way people don't need to read all messages.
Thank you!

Just for your information:
The updated code gives me the same result as with the previous code.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Compare 2 file lists with each other?

Post by NotNull »

Even with 1372a?

For me, the 1372a version does not work (=no results) with the previous code.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Compare 2 file lists with each other?

Post by tuska »

NotNull wrote: Mon Apr 22, 2024 9:38 am Even with 1372a?

For me, the 1372a version does not work (=no results) with the previous code.
For me, the PREVIOUS code is here:

Code: Select all

#if:<#stricmp:<#element:<$param:,;,1>,#element:<$param:,;,2>>==0,"!">   file:   regex:#regex-escape:<#element:<$param:,;,1>>(.*$) | regex:#regex-escape:<#element:<$param:,;,2>>(.*$)    unique:regmatch1;size;dm
I have now carried out another test with the previous code - search query:

Code: Select all

diff:"D:\totalcmd\Test\";"C:\totalcmd\Test\"
It is again the same result in Everything 1.5.0.1372a (x64) that I had already documented in the morning:
 
2024-04-22_Macro diff - 'D totalcmd Test' - 'C totalcmd Test'.png
2024-04-22_Macro diff - 'D totalcmd Test' - 'C totalcmd Test'.png (104.6 KiB) Viewed 2015 times
 
2024-04-22_Synchronize directories_'D totalcmd Test' - 'C totalcmd Test'.png
2024-04-22_Synchronize directories_'D totalcmd Test' - 'C totalcmd Test'.png (35.81 KiB) Viewed 1995 times
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Compare 2 file lists with each other?

Post by NotNull »

Please try with paths that contain spaces.
(also: make sure there aren't multiple filters using the same macro-name, although I think you already took care of that)

Results here (diff1: is the old filtermacro; diff2: the new one) in a fresh instance:
2024-04-25 18_36_24-diff2__t__diff_folder 1__;_t__diff_folder 2__ - Everything (diff) 1.5.0.1372a (x.png
2024-04-25 18_36_24-diff2__t__diff_folder 1__;_t__diff_folder 2__ - Everything (diff) 1.5.0.1372a (x.png (48.09 KiB) Viewed 1937 times
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Compare 2 file lists with each other?

Post by tuska »

Hi,

I have now also created 2 Filter macros: (Previously I had changed the code before a search query)
diff:       new code
diff-old: old code

My search queries for a different file structure(!):
Filter: Everything

Code: Select all

diff:"D:\totalcmd\Test 1\";"C:\totalcmd\Test 1\"
diff-old:"D:\totalcmd\Test 1\";"C:\totalcmd\Test 1\"
Results in Everything 1.5.0.1373a (x64):
- If there is a folder with a space in the search query, I get NO result with the old or new code.
  (To check, I searched for files that should be present in the search result and these could be found).
- If there is a subfolder with a space in the folder structure, I will get a result.
- If there is NO folder with a space in the search query, then I get a / the same result with the old or new code.

OLD code:

Code: Select all

#if:<#stricmp:<#element:<$param:,;,1>,#element:<$param:,;,2>>==0,"!">   file:   regex:#regex-escape:<#element:<$param:,;,1>>(.*$) | regex:#regex-escape:<#element:<$param:,;,2>>(.*$)    unique:regmatch1;size;dm
NEW code:

Code: Select all

#if:<#stricmp:<#element:<$param:,;,1>,#element:<$param:,;,2>>==0,"!">       file:   regex:[regex-escape:[element:$param:,;,1]](.*$) | regex:[regex-escape:[element:$param:,;,2]](.*$)    unique:regmatch1;size;dm
Unfortunately, I had never tested a search query (filter macro) with spaces in the folder before.
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Compare 2 file lists with each other?

Post by void »

- If there is a folder with a space in the search query, I get NO result with the old or new code.
Could you please send the debug output:
  • Clear your search.
  • From the Tools menu, under the Debug submenu, click Start Debug Logging...
  • Search for:
    diff:"D:\totalcmd\Test 1\";"C:\totalcmd\Test 1\"
  • From the Tools menu, under the Debug submenu, click Stop Debug Logging...
    ---this will open your Everything Debug Log.txt in Notepad.
  • Could you please reply with the contents from this file.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Compare 2 file lists with each other?

Post by tuska »

2void
2NotNull

I'm very sorry but I made a mistake when duplicating the code for the filter ("diff-new" ... "diff-old")
and mistakenly used the code from "diff-old" for "diff-new". :oops:

For this reason, I could NOT get a result even with the "new" code for a path with spaces.
Unfortunately, I didn't notice this during my tests.

The new code works perfectly :!:

Code: Select all

#if:<#stricmp:<#element:<$param:,;,1>,#element:<$param:,;,2>>==0,"!">    file:   regex:[regex-escape:[element:$param:,;,1]](.*$) | regex:[regex-escape:[element:$param:,;,2]](.*$)    unique:regmatch1;size;dm
 
2024-05-23_Filter 'Everything' - Macro 'diff' (new!).png
2024-05-23_Filter 'Everything' - Macro 'diff' (new!).png (76.45 KiB) Viewed 1423 times
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Compare 2 file lists with each other?

Post by void »

Thanks for testing diff: tuska,

#regex-escape:< would have never worked with spaces.

#function: will preserve spaces, treating them as AND in your query
[function:] will escape spaces, treating them literally in your query



For other users, please also make sure there is no space after diff:

Example usage:

Code: Select all

diff:"c:\path\to\folder1";"c:\path\to\folder2"


Please make sure no search options are enabled in your diff filter:
  • In Everything, from the Search menu, click Organize Filters.
  • Select your diff filter and click Edit.
  • Uncheck Match case.
  • Uncheck Match diacritics.
  • Uncheck Match whole words.
  • Uncheck Match path.
  • Uncheck Match prefix.
  • Uncheck Match suffix.
  • Uncheck Ignore punctuation.
  • Uncheck Ignore white-space.
  • Uncheck Regular expressions.
  • Click OK.
  • Click OK.
Post Reply