If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at

Main Menu

Clean DateTimeOriginal from subseconds

Started by exifnewbee, November 19, 2022, 05:02:20 AM

Previous topic - Next topic

Phil Harvey

Sorry.  There were some crucial errors in my command when writing the file names.  It should have been:

exiftool -filepath -q -s3 -if "$exif:datetimeoriginal =~ /\./" -r DIR > file_list.txt

Then only the file path names are written.  The -s3 option avoids writing the tag names, and the -q option avoids the processing messages.  Also, the proper tag name was FilePath, not PathName.

To "feed this back in" with the -@ option, do this:

exiftool -@ file_list.txt "-subsecdatetimeoriginal<exif:datetimeoriginal" "-subseccreatedate<exif:createdate" "-subsecmodifydate<exif:modifydate" -overwrite_original -P

- Phil

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).


thanks so much! this is now working great!