Search Wildcards

I can’t find any details about wildcard or escape characters for search syntax. I’d like to search for all files that end in *-1.jpg and I can’t figure out how to do this. It. seems like file:*.-1.jpg should work, but it doesn’t. Neither does file:\*-1.jpg.

Did you try (star)-1.jpg?

MyLio forums seems to filter out stars, fill in (star) with shift-8 key on keyboard

Yes, I tried *-1.jpg. I corrected my post to reflect this.

It seems that dash is some sort of special character. I have two files in Mylio
IMG_4960.jpg and IMG_4960-1.jpg.
When I put file:4860 in the search box, I get both files in the results list. When I put file:4960-1 in the search box, I get no results.

This might do it:

media:“FileNameNoExt like ‘%-1’”

Watch the quotes, those are non-smart double quote marks on the outside, and non-smart single quotes around %-1.

Thanks for the suggestion, but I couldn’t get this to work. I was careful with the quotes and even retyped it by hand. Strangely enough
media:“FileNameNoExt like ‘%2181’”
returned both IMG_2181.jpg and IMG_2181-1.jpg

It seems like Mylio is filtering -1 out of the filename before comparison.

Mylio seems to add -1 to local filenames when there is some sort of difficulty with replication between computers, but when you try to edit such image filenames manually, it hides the -1, presumably because it knows that the filename on other vaults doesn’t have it.

I wonder if the same thing has happened here - did you create the -1 images, or did Mylio?

Mylio created a pile of duplicate files in a folder for some reason. They all have -1 at the end. I’m trying to search and delete them.

Care is needed with this. If you have more than one device, and I hope you do because storage drives fail, things can get complicated.

On my computers, I can see that Mylio has an image named IMG_2166, but on one system the filename is IMG_2166.jpg, and on the other it is IMG_2166-1.jpg (but Mylio shows it as IMG_2166 regardless, on both computers). I would be wrong to assume that the -1 file was a duplicate if I found it in the file system.

However, if Mylio were showing both copies (and I have seen it do so, but I can’t find any images like that in my system at the moment), it may well be that Mylio considers the -1 version on one to be the normally-named one on the other, and vice versa. In this case, deleting the -1 version on one system deletes the normally-named one on the other, leaving you with what I have described in the paragraph above - mismatched names, but only one copy.

So, the next question is: does Mylio show you the duplicates in the UI, or do they only show in your Finder/File Explorer?

EDIT: I think you already told me the answer to this, by saying Mylio finds both IMG_2181.jpg and IMG_2181-1.jpg earlier on. The duplicates DO show.

I think in the end you’re better off reporting the issue to Mylio Support, so they can try to understand how the situation arose and then help you sort it out.

I can’t think of a way to do what you want inside Mylio other than careful UI work. If I were in a hurry, what I would do next is to take a complete backup, because being in a hurry leads to mistakes. Then I would close Mylio and find the -1 duplicates (on one computer only) using a shell script, in which I would use the command-line utility exiftool to add a new keyword to the corresponding XMP sidecars which Mylio can subsequently find. I use Macs, but I’m sure the same process can be done on Windows. Having found the keyworded images in Mylio, I would label them differently so they show up in the UI, and check to make sure they are safe to delete (Is it the right one? Is the metadata safe on the other copy? Do your other devices agree?); then move them all to a temporary folder to double-check, before finally deleting them.

Thanks for the detailed and valuable advice.

Yes, I see duplicates in the Mylio UI. I checked both my vaults and the original and -1 versions are both there. The metadata that Mylio displays for the original and -1 versions are slightly different, though. For example, one has lens info displayed and the other doesn’t.

I don’t know how this happened, since it’s a photo collection that I haven’t touched in awhile.

I’ll ask Mylio support for help.