ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: VladChav on March 28, 2018, 10:03:50 AM

Title: Change randomly time to images in a folder
Post by: VladChav on March 28, 2018, 10:03:50 AM
Hello! Good day :)  How change randomly time to images in a folder? In a time from 11:00 to 16:00, I have learned to use -filesequence but I do not know how to do it randomly, I found something in the forum where they used the command "rand" someone can you help me?
Thank you in advance for your support.
Title: Re: Change randomly time to images in a folder
Post by: Phil Harvey on March 28, 2018, 11:02:53 AM
This is a bit sneaky, but it will shift the DateTimeOriginal of all images in a directory by a random amount between 0 and 1000 seconds:

exiftool "-datetimeoriginal+<0:0:${filename;$_=rand(1000)}" DIR

- Phil
Title: Re: Change randomly time to images in a folder
Post by: VladChav on March 28, 2018, 11:56:39 AM
Perfect! Many thanks Phil :)