photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: mopperle on October 19, 2023, 09:09:51 PM

Title: Problem with adding a folder to database
Post by: mopperle on October 19, 2023, 09:09:51 PM
I have/had this folder:
C:\Users\USERNAME\Pictures\iPhone Bilder and it is in the database. Imatch shows that a rescan is needed. I do so, but nothing happens, the dialog windows appears for a fraction of a second. I tried it again and again with Shift+F5 and CTRL+Shift+F5, but nothing.
So I decide to remove it from the database (worked) and then deleted the folder from the disk.
Then I created a new folder, named it iPhone13Pro and tried to add it to the database. Nothing happened. Then I tried various other folders in the root directory C:\Users\USERNAME\Pictures\, all worked fine and appeared in the database.
Then I created another folder "Smartphone" and also could add it to the database.
Could it be that the string "iphone" is somehow toxic? Logfile attached.
Title: Re: Problem with adding a folder to database
Post by: Mario on October 19, 2023, 10:04:46 PM
IMatch does not care for folder names.
Maybe the folder was marked as "hidden" or "system" in the Windows file system? Did you check?
See Edit > Preferences > Indexing for more info.

Log file looks OK. A folder was rescanned. I cannot tell the path.
No new or updated or deleted files were found.
Title: Re: Problem with adding a folder to database
Post by: mopperle on October 20, 2023, 10:50:25 AM
I think I found the problem. Under preferences/indexing I have made an exclusion for certain subfolders:
 2023-10-20 10.31.14 000.png
In this case the subfolder "iPhone". But this would mean that ALL subfolders STARTING with the string "iPhone" are being skipped. A folder like "AppleiPhone" will be scanned. I checked this with my other exclusions and I see the same. A folder starting with that string will be ignored, a folder containing that string will be scanned.

I'm also confused wit this sentence in the helpsystem:
QuoteWith the regular expression
\\CaptureOne$ you can instruct IMatch to skip folders ending in CaptureOne
To test this I have created a folder "AppleiPhone". According to the help this folder should be skipped, when adding this exclusion: "iPhone$". But it will be added to te database.

What I would expect that only such folders are excluded with the exact naming in the exclusion like "iPhone" would be skipped:
- folder "iPhone" -> skip
- folder "iPhone13 -> add to database
Title: Re: Problem with adding a folder to database
Post by: thrinn on October 20, 2023, 12:17:47 PM
Works here. I have created an exclusion for "iPhone$" which should exclude all folders ending with iPhone.
2023-10-20 12_14_19-Preferences.jpg

I created 3 folders:
2023-10-20 12_15_38-Z__TEST_Topic 13695.jpg

After rescanning the parent folder, I end up with only the "iPhone13" folder which is exactly how it should be:
2023-10-20 12_16_33-IM Test 01.imd5.jpg
Title: Re: Problem with adding a folder to database
Post by: Mario on October 20, 2023, 01:10:24 PM
Use \\iPhone$ to prevent a too-loose match.
This means the folder name must be \iPhone precisely (end with iPhone).
This will skip iPhone but not iPhone13.

Tip: Use the handy RegExp tester app to check your regular expressions if in doubt.
Shift+Ctrl+P for the command palette. Search for regex

Image1.jpg

Image2.jpg
Title: Re: Problem with adding a folder to database
Post by: mopperle on October 20, 2023, 01:31:09 PM
Yes, this way it works. But then the helpfile is misleading when saying:
Quote"With the regular expression \\CaptureOne$  you can instruct IMatch to skip folders ending in CaptureOne"
According to this it should skip a folder "AppleiPhone" as the folder ends with iPhone, but it doesnt.
Title: Re: Problem with adding a folder to database
Post by: Mario on October 20, 2023, 02:18:22 PM
Quote from: mopperle on October 20, 2023, 01:31:09 PMYes, this way it works. But then the helpfile is misleading when saying:
Quote"With the regular expression \\CaptureOne$  you can instruct IMatch to skip folders ending in CaptureOne"
According to this it should skip a folder "AppleiPhone" as the folder ends with iPhone, but it doesnt.

I think the help is correct.
\\CaptureOne$  will skip all folders ending with \CaptureOne, because of the leading \ and the $ postfix.
A folder named \CaptureOneTwo will not be skipped and neither will the folder named \MyCaptureOne
Title: Re: Problem with adding a folder to database
Post by: thrinn on October 20, 2023, 02:20:14 PM
Quote from: mopperle on October 20, 2023, 01:31:09 PMYes, this way it works. But then the helpfile is misleading when saying:
Quote"With the regular expression \\CaptureOne$  you can instruct IMatch to skip folders ending in CaptureOne"
According to this it should skip a folder "AppleiPhone" as the folder ends with iPhone, but it doesnt.

No. A regular expression like this looks for  "\iPhone" at the end of the folder name - not "iPhone". The backslash is part of the RegExp - it has to be escaped with another backslash so that it is interpreted as the character "\".
\\iPhone$
The intention is to explicitly only match sub folders which are named exactly "iPhone". If you want to a also match AppleiPhone, just leave out the double backslash.
Title: Re: Problem with adding a folder to database
Post by: Mario on October 20, 2023, 02:39:54 PM
And if you want to skip any folder with a name containing iPhone somewhere, also omit the $ at the end => iPhone
This gives users all the options they may need.
Title: Re: Problem with adding a folder to database
Post by: mopperle on October 20, 2023, 03:17:14 PM
Ah, Thanks for clarifying. I'm not a developer and not so familiar with this stuff. ;)