I feel pretty dumb but I really can't figure out how to do this,
I own a Sony camera which produces mp4 videos and xml files with their metadata.
I would like to rename all my files to the date when they were created. My code is ilke this:
exiftool -k -ext MP4 -ext XML -ee -d %y%m%d-%H%M%S%%-c.%%e "-FileName<CreateDate" .
my output:
Warning: [minor] Error 3 placing ::NonRealTimeMetaLtcChangeTableLtcChangeStatus in structure or list - ./1.XML
Warning: [minor] Error 3 placing ::NonRealTimeMetaAudioFormatAudioRecPortAudioCodec in structure or list - ./1.XML
Warning: [minor] Error 3 placing ::NonRealTimeMetaAudioFormatAudioRecPortPort in structure or list - ./1.XML
Warning: [minor] Error 3 placing ::NonRealTimeMetaAudioFormatAudioRecPortTrackDst in structure or list - ./1.XML
Warning: [minor] Error 3 placing ::NonRealTimeMetaLtcChangeTableLtcChangeValue in structure or list - ./1.XML
Warning: No writable tags set from ./1.XML
1 directories scanned
0 image files updated
2 image files unchanged
my mp4 doesn't rename neither does my xml
they are called 1.mp4 and 1.xml and I want them both to have the same name with the date.
the tag does exist,
exiftool -k -time:all 1.mp4
gives me:
File Modification Date/Time : 2019:03:15 03:44:13+01:00
File Access Date/Time : 2019:03:15 13:43:07+01:00
File Creation Date/Time : 2019:03:15 13:43:07+01:00
Create Date : 2019:03:15 02:43:56
Modify Date : 2019:03:15 02:43:56
Track Create Date : 2019:03:15 02:43:56
Track Modify Date : 2019:03:15 02:43:56
Media Create Date : 2019:03:15 02:43:56
Media Modify Date : 2019:03:15 02:43:56
Time Zone : +01:00
Last Update : 2019:03:15 03:43:56+01:00
Could somebody point me out what I am doing wrong?
Thanks!
What happens if you run the command without -k and -ee. Neither should be necessary for reading the CreateDate.
The XML likely didn't contain a CreateDate, but I can't figure out why the MP4 didn't get renamed since it does apparently have a CreateDate.
Try this:
exiftool -d %y%m%d-%H%M%S%%-c.%%e -p "$createdate" 1.mp4
If that works, then this should as long as you have write permission:
exiftool -d %y%m%d-%H%M%S%%-c.%%e "-filename<createdate" 1.mp4
- Phil