I have a problem and no clear idea on how best to solve it. Please look at the image:
First, you MUST assume that a file with the exact same name, minus "(Case Conflict)" always exists; that would bethe an original file. What's happened is that through the years--and multiple Nikon cameras and smartphones, and restoring files from backups when getting a new computer--I've ended up with duplicates/triplicates of the same files, and not always in the same case. For example, one of my old devices arbitrarily named its images ".JPG" so I have case issues, too.
In the first Dolphin pane, you can see I'm only showing files that matched "conflict" (case insensitive); the first type of problem shows the duplicate and triplicate of the same image, one named with "(Case Conflict)" before, and the other one after, the ".jpg"
In the second pane, I'm in a directory where I've already cleaned up triplicates--manually, by visually making sure the images were actually the same. This is NOT always the case. As noted above, a plethora of devices over the years has yielded files with the same name, but they're actually different images. This is why I think I may be stuck not using a bash script, but visually inspecting each set.
I'm resigned to doing this manually, in Dolphin...but I don't want to. I'd vastly prefer an automated way of doing it. But my brain--which has been both rattled by a craniotomy to remove a brain tumor, and years later ravaged by sepsis--isn't at its best right now. I'd appreciate any and all input on how I might make this task a little less cumbersome.
To summarize:
- various directories contain duplicates or triplicates of the same name
- examples: dcp_1111.jpg - dcp_1111.JPG - DCP_1111.JPG - dcp_1111 (Case Conflict).jpg - dcp_1111.jpg (Case Conflict)
- like-named files may or may not actually contain the same image
- if the dups do contain the same image, I want to delete the one(s) with "(Case Conflict)" added
- if the dups do not contain the same image, I want to segregate them in a directory where I can later visually inspect them
I'm thinking that an image's EXIF info, and/or its time-stamp and size, could be used to facilitate this. I used to be highly proficient with ImageMagick at the command line. I'm not now. But I'll bet its capabilities plus some bash scripting could do what I need.
First, you MUST assume that a file with the exact same name, minus "(Case Conflict)" always exists; that would be
In the first Dolphin pane, you can see I'm only showing files that matched "conflict" (case insensitive); the first type of problem shows the duplicate and triplicate of the same image, one named with "(Case Conflict)" before, and the other one after, the ".jpg"
In the second pane, I'm in a directory where I've already cleaned up triplicates--manually, by visually making sure the images were actually the same. This is NOT always the case. As noted above, a plethora of devices over the years has yielded files with the same name, but they're actually different images. This is why I think I may be stuck not using a bash script, but visually inspecting each set.
I'm resigned to doing this manually, in Dolphin...but I don't want to. I'd vastly prefer an automated way of doing it. But my brain--which has been both rattled by a craniotomy to remove a brain tumor, and years later ravaged by sepsis--isn't at its best right now. I'd appreciate any and all input on how I might make this task a little less cumbersome.
To summarize:
- various directories contain duplicates or triplicates of the same name
- examples: dcp_1111.jpg - dcp_1111.JPG - DCP_1111.JPG - dcp_1111 (Case Conflict).jpg - dcp_1111.jpg (Case Conflict)
- like-named files may or may not actually contain the same image
- if the dups do contain the same image, I want to delete the one(s) with "(Case Conflict)" added
- if the dups do not contain the same image, I want to segregate them in a directory where I can later visually inspect them
I'm thinking that an image's EXIF info, and/or its time-stamp and size, could be used to facilitate this. I used to be highly proficient with ImageMagick at the command line. I'm not now. But I'll bet its capabilities plus some bash scripting could do what I need.
Comment