Modify FileModifyDate from gpsDateStamp plus custom time

Started by marciano, April 01, 2024, 02:28:44 PM

Previous topic - Next topic

marciano

I have some files that the only data about date is gpsDateStamp. It lacks time stamp.
I need to change the tag -FileModifyDate from gpsDateStamp plus 00:00:00
I first tried to add time to gpsDateStamp tag exiftool "-gpsDateStamp<${gpsDateStamp} 00:00:00" fileI got an error "Invalid tag name '00:00:00'"
How can I solve this?
Thank you

StarGeek

Quote from: marciano on April 01, 2024, 02:28:44 PMI got an error "Invalid tag name '00:00:00'

This shows that the value for ${gpsDateStamp} isn't passed, which indicates that it is being treated as an empty command line variable, not an exiftool variable.

If you're on Windows, use that command in CMD, not Powershell. If you're on Mac/Linux, change the double quotes into single quotes. 
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

marciano

I changed by single quotes. A copy was created and the original saved as *_original but
exiftool  -gpsDateStamp filestill shows only date without the added time 00:00:00
Thank you!

StarGeek

Quote from: marciano on April 01, 2024, 05:41:39 PMI changed by single quotes. A copy was created and the original saved as *_original

From the Documention
QuoteBy default the original files are preserved with _original appended to their names -- be sure to verify that the new files are OK before erasing the originals.

You can suppress the creation of backup files with the -overwrite_original option.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

marciano

But the replaced file does not contain  the added time!
Mention of keeping the _original file wasn't the question, just a confirmation that the original was replaced but kept as a new file

StarGeek

Sorry, I misread what you were trying to do.

To write the FileModifyDate from GPSDateStamp, you would use
exiftool "-FileModifyDate<$GPSDateStamp 00:00:00" /path/to/files/

This is for Windows CMD.  If on Mac/Linux, change the double quotes to single quotes.

GPSDateStamp only holds the date. If you wanted to add a time, you would write to the GPSTimeStamp.

exiftool -GPSTimeStamp=00:00:00 /path/to/files/

C:\>exiftool -time:all --system:all -e -G1 -a -s y:\!temp\Test4.jpg
[GPS]           GPSTimeStamp                    : 01:16:29
[GPS]           GPSDateStamp                    : 2024:04:02
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).