This PC/Phone... does not match using fileexists:

Discussion related to "Everything" 1.5 Alpha.
Post Reply
anmac1789
Posts: 669
Joined: Mon Aug 24, 2020 1:16 pm

This PC/Phone... does not match using fileexists:

Post by anmac1789 »

I am trying to compare these 2 folders:
dir1=This PC\\MI MAX\\Internal shared storage\\DCIM\\Camera
dir2=U:\\xiaomi mi cloud\\gallery_dtp_download_055ffb5122d847e09c364c596543a333 \(1\)\\1673644767\\Camera

<regex:^"This PC\\MI MAX\\Internal shared storage\\DCIM\\Camera\\(.*)$" fileexists:"U:\\xiaomi mi cloud\\gallery_dtp_download_055ffb5122d847e09c364c596543a333 \(1\)\\1673644767\\Camera\\$1:">|<regex:^"U:\\xiaomi mi cloud\\gallery_dtp_download_055ffb5122d847e09c364c596543a333 \(1\)\\1673644767\\Camera\\(.*)$" fileexists:"This PC\\MI MAX\\Internal shared storage\\DCIM\\Camera\\$1:">


using fileexists but only the results of "This PC\\MI MAX\\Internal shared storage\\DCIM\\Camera" show. dir1 and dir2 results don't show together. I know for sure that dir1 has the same files as dir2.

I have This PC\\MI MAX\... included in the folder index
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: This PC/Phone... does not match using fileexists:

Post by therube »

First question...

Do you have a file manager that can access both directories?
Does that file manager have a directory compare feature that will match same named files?


---


Without looking too closely, I assume what you have about is similar to this:
regex:c:\\tmp\\(.*) fileexists:c:\\out\\\1 | regex:c:\\out\\(.*) fileexists:c:\\tmp\\\1


Where you are OR'ing the two sets of directories, looking for common files within each (to display both sets).
Except - at least as I've written, the OR is being ignored (or, ;-), I'm not interpreting what is happening, correctly).
Only the c:\tmp files are being listed.

So it is saying...
List the files (names) in c:\tmp that are dup'd in c:\out.

Where you want...
List the files (names) in c:\tmp that are dup'd in c:\out *AND* List the files in c:\out that are dup'd in c:\tmp.

Not sure if you can enclose things in quotes, or otherwise, to get both ends to list?


Depending on what you're actually looking to accomplish, there may be better was to do it.
Maybe something like:
dupename: <c:/tmp/* | c:/out/*>



Ah, OK, you can:
<regex:c:\\tmp\\(.*) fileexists:c:\\out\\\1> | <regex:c:\\out\\(.*) fileexists:c:\\tmp\\\1>

So you need to group < > the two data sets.


(Do note that you are only comparing names.)
.
Everything fileexists.png
Everything fileexists.png (15.28 KiB) Viewed 1418 times
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: This PC/Phone... does not match using fileexists:

Post by therube »

Oh, so you are grouping.

Run each half separately & see if you're getting expected results:
regex:c:\\out\\(.*) fileexists:c:\\tmp\\\1

regex:c:\\tmp\\(.*) fileexists:c:\\out\\\1
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: This PC/Phone... does not match using fileexists:

Post by therube »

I'm probably missing something, syntax-wise, but in general it looks like you do have it correct.

Code: Select all

<regex:^"This PC\\MI MAX\\Internal shared storage\\DCIM\\Camera\\(.*)$" fileexists:"U:\\xiaomi mi cloud\\gallery_dtp_download_055ffb5122d847e09c364c596543a333 \(1\)\\1673644767\\Camera\\$1:">
|
<regex:^"U:\\xiaomi mi cloud\\gallery_dtp_download_055ffb5122d847e09c364c596543a333 \(1\)\\1673644767\\Camera\\(.*)$" fileexists:"This PC\\MI MAX\\Internal shared storage\\DCIM\\Camera\\$1:">

"This PC\\MI MAX\\Internal shared storage\\DCIM\\Camera\\(.*)$" 
"U:\\xiaomi mi cloud\\gallery_dtp_download_055ffb5122d847e09c364c596543a333 \(1\)\\1673644767\\Camera\\$1:"
"U:\\xiaomi mi cloud\\gallery_dtp_download_055ffb5122d847e09c364c596543a333 \(1\)\\1673644767\\Camera\\(.*)$"
"This PC\\MI MAX\\Internal shared storage\\DCIM\\Camera\\$1:">
anmac1789
Posts: 669
Joined: Mon Aug 24, 2020 1:16 pm

Re: This PC/Phone... does not match using fileexists:

Post by anmac1789 »

I still couldnt get This PC path to work...
Post Reply