I would like to move all pictures without a original date. How can I do that?
Duplicate images should be renamed
exiftool "-directory=/volumeUSB2/Pictures/" -if 'not $datetimeoriginal' "-filename<ModificationDate" -d "%Y-%m-%d_%H-%M-%S%%-c.%%le" -r /volumeUSB2/usbshare/PicturesBackup/
Your command looks good to me, except that you should use FileModifyDate, not ModificationDate.
- Phil
yes thanks it works. :)
But the pictures are now in the same directory and have not been moved.
Works for me:
% ls tmp tmp2
tmp:
a.jpg
tmp2:
% exiftool "-directory=tmp2" -v -if 'not $datetimeoriginal' "-filename<FileModifyDate" -d "%Y-%m-%d_%H-%M-%S%%-c.%%le" -r tmp
======== tmp/a.jpg
Setting new values from tmp/a.jpg
'tmp/a.jpg' --> 'tmp2/2020-01-28_07-29-32.jpg'
1 directories scanned
1 image files updated
% ls tmp tmp2
tmp:
tmp2:
2020-01-28_07-29-32.jpg
What is here wrong?
root@sys: exiftool "-directory=/home/TEST2" -v -if 'not $datetimeoriginal' "-filename<FileModifyDate" -d "%Y-%m-%d_%H-%M-%S%%-c.%%le" -r "/home/NEU/"
1 directories scanned
0 image files read
root@syslog:/home/TEST2# ls
03_doppelt.jpg 20020101_10h10m00s_4.jpg 20020101_10h10m00s.jpg DSC_0008.JPG DSC_0018.JPG_original
05_doppelt.jpg 20020101_10h10m00s_5.jpg DSC_0003.JPG DSC_0008.JPG_original
20020101_10h10m00s_1.jpg 20020101_10h10m00s_6.jpg DSC_0003.JPG_original DSC_0013.JPG
20020101_10h10m00s_2.jpg 20020101_10h10m00s_7.jpg DSC_0005.JPG DSC_0013.JPG_original
20020101_10h10m00s_3.jpg 20020101_10h10m00s_8.jpg DSC_0005.JPG_original DSC_0018.JPG
Your source directory is /home/NEU/. What files are in this directory? I'm guessing it is empty because ExifTool didn't find any files.
- Phil
Oh thanks :) the directory was emtpy.
it has now worked on my ubuntu server but on my Synology NAS:
ash-4.3# exiftool "-directory=/volumeUSB2/usbshare/Bilder" -v -if 'not $datetimeoriginal' "-filename<FileModifyDate" -d "%Y-%m-%d_%H-%M-%S%%-c.%%le" -r "/volumeUSB2/usbshare/Old"
1 directories scanned
0 image files read
So what is the output of this command?:
ls /volumeUSB2/usbshare/Old
- Phil
Hello Phil,
ash-4.3# ls /volumeUSB2/usbshare/Old
ash-4.3#
There you go. That's why the command didn't work. No files in that directory.
- Phil
Oh sorry the same mistake again :(
It worked now too. But I have a lot of files with "failed condition". Why?
But the file has all the timestamps:
File Modification Date/Time : 2020:01:26 21:31:00+01:00
File Access Date/Time : 2020:01:30 20:00:22+01:00
File Inode Change Date/Time : 2020:01:26 21:31:00+01:00
Modify Date : 2018:08:22 17:06:47
Date/Time Original : 2018:08:22 17:06:47
Create Date : 2018:08:22 17:06:47
or:
File Modification Date/Time : 2019:08:06 19:05:04+02:00
File Access Date/Time : 2020:01:30 20:04:04+01:00
File Inode Change Date/Time : 2019:08:06 19:05:04+02:00
Modify Date : 2018:08:14 20:28:19
Date/Time Original : 2018:08:14 20:28:19
Create Date : 2018:08:14 20:28:19
Digital Creation Date : 2018:08:14
Date Created : 2018:08:14
Create Date : 2018:08:14 20:28:19.211
Date/Time Original : 2018:08:14 20:28:19.211
Date/Time Created : 2018:08:14 20:28:19
Digital Creation Date/Time : 2018:08:14 20:28:19
The condition is
-if 'not $datetimeoriginal'
it will fail if DateTimeOriginal exists.
- Phil