Problem with adding a folder to database

Started by mopperle, October 19, 2023, 09:09:51 PM

Previous topic - Next topic

mopperle

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.

Mario

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.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mopperle

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

thrinn

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
Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

#4
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
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mopperle

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.

Mario

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
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

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.
Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

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.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mopperle

Ah, Thanks for clarifying. I'm not a developer and not so familiar with this stuff. ;)