Hi,
is there a way to rewrite the "DateTimeOriginal" of 300 images with an rondom date? Regardless which date.
I have a software which plays the picture in a Slideshow in order to the datetimeoriginal. But I will have a rondom order. So I will rewrite the tag.
You can do this with a user-defined Composite tag. Here is a config file that will do it:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
RandomDate => {
Require => 'FileName',
ValueConv => sub {
return sprintf("%.4d:%.2d:%.2d %.2d:%.2d:%.2d",
rand(15) + 2000, #year
rand(12) + 1, # month
rand(28) + 1, # day
rand(24), # hour
rand(60), # minute
rand(60) # second
);
},
},
},
);
# end
And the command would be:
exiftool -config my.config "-datetimeoriginal<randomdate" DIR
where DIR is a directory containing the images.
- Phil