Move files if (binary) different

Started by hoppy1977, June 12, 2018, 12:53:49 AM

Previous topic - Next topic

hoppy1977

Hi,

I'm using ExifTool to move images from various folders into a nice date-based folder structure (using "-Directory<DateTimeOriginal").
Here is what I have so far:
exiftool -v0 -r -ext jpg "-Directory<DateTimeOriginal" -d "F:\TargetFolder\%Y_%m_%d - x" "F:\SourceFolder"

The problem I have is frequently there will be duplicates of the same files. I.e. I might be asking ExifTool to move one to ten copies of the same file into the output folder. In most cases this is fine - the files are all the same so ExifTool will move the first one, then give an error when attempting to move the rest, so there will be only one copy of each file in the output folder.

The problem I have is that in some (rare) situations the files might be different but have the same filename. In this case I _do_ want both copies to be moved into the output folder.

Is there any way for me to tell ExifTool to deal with conflicts as follows:
1. If there is a conflict when moving a file to the target, do a binary comparison of the files.
2. If the files are the same, ignore any conflicts, else
3. If the files are binary different (even though they have the same filename), then move both files to the output, adding the copy number (%c) to the second one.

Any help would be appreciated.

Phil Harvey

There is no way to do this with ExifTool alone.  Perhaps you could move them all then delete the ones that are duplicates using some other technique.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

hoppy1977

No worries.
Thanks for the great product, BTW.