ExifTool Forum

ExifTool => Newbies => Topic started by: frogger on July 07, 2015, 04:24:43 AM

Title: move existing files in another directory
Post by: frogger on July 07, 2015, 04:24:43 AM
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
Title: Re: move existing files in another directory
Post by: Phil Harvey on July 07, 2015, 07:23:00 AM
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
Title: Re: move existing files in another directory
Post by: frogger on July 07, 2015, 07:57:37 AM
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
Title: Re: move existing files in another directory
Post by: Phil Harvey on July 07, 2015, 08:08:22 AM
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
Title: Re: move existing files in another directory
Post by: frogger on July 07, 2015, 08:53:15 AM
thanks, i will try it