Main Menu

moving files

Started by luusac, August 31, 2018, 06:31:36 AM

Previous topic - Next topic

luusac

Hi,
I have used exiftool to move/rename files into a hierarchy based on year & month, e.g.

2002
         january
         february
2003
        january

etc.

I now have two sets of hierarchies that I want to merge.  Both follow the same year/month directory and filename pattern.  The problem is that many files have the same name based on exif renaming to day.month.year_hour.minute.second.jpg e.g. 13.09.2002_10.35.43.jpg
The files are not identical according to a duplicate checker (fslint) and it may be that the only difference is in the metadata, not the actual 'content' of the image.  So how can get exiftool to move the files from hierarchy b to hierarchy a and append the -%%c counter where the filenames match and do so recursively, whilst keeping the hierarchy structure?
thanks

Phil Harvey

Try this:

1. cd SRCDIR

2. exiftool "-testname=DSTDIR/%d/%f%-c.%e" -r .

... and if this looks good, then replace "testname" with "filename" in the second command to actually do the moving/renaming.

- 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 ($).

luusac

that did the trick.
Many thanks.