move existing files in another directory

Started by frogger, July 07, 2015, 04:24:43 AM

Previous topic - Next topic

frogger

hi, i organize my pictures with the folloing command. this works fine.
but when i have duplicate files i dont want to use the '-c' flag. i want to move this files in another directory, e.g /volume1/photo/duplicate_files. is this possible

exiftool  -v -r -d %%le/%Y/%m/%Y%m%d_%H%M%S_%f.%%le '-filename<filemodifydate' '-filename<datetimeoriginal' -i '@eaDir' -ext JPG -ext mp4 -ext MOV -ext PNG -progress -P /volume1/photo/Upload/

Thanks

Phil Harvey

After running the command once, any files remaining must have duplicates.  So then change the output directory to duplicate_files and run the command again.

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

frogger

thanks, but is there no chance to do it automatically? i run the command as a cronjob, and I do not know when it is finished, and whether during which new images have been added. Is there any such thing as an output parameter for files with errors (duplicates)

Thanks

Phil Harvey

What about running this as a cron job?:

#!/bin/sh
cd  /volume1/photo
exiftool -v -r -directory=working/%d -i '@eaDir' -ext JPG -ext mp4 -ext MOV -ext PNG /volume1/photo/Upload/
exiftool -v -r -d %%le/%Y/%m/%Y%m%d_%H%M%S_%f.%%le '-filename<filemodifydate' '-filename<datetimeoriginal' -progress working
exiftool -v -r -d duplicate_files%-c/%%le/%Y/%m/%Y%m%d_%H%M%S_%f.%%le '-filename<filemodifydate' '-filename<datetimeoriginal' -progress working


Note that I have removed -P because it isn't necessary when writing only "pseudo" System tags.  I have also added a %-c to the directory name to handle triplicates, etc, but I don't know how you want to handle these.

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

frogger