In Windows 10 environment, I would like to change the name of both “file with extension mp4” and “file with extension xml” to the shooting date of mp4 file.
C0001.MP4
C0001M01.XML
C0002.MP4
C0002M01.XML
Specifically, I want to change the file name as follows.
2019-10-23_13-10-32.MP4
2019-10-23_13-10-32.XML
2019-10-23_13-10-49.MP4
2019-10-23_13-10-49.XML
I tried to think that using the ext option would give me the expected result, but I didn't get the expected result.
First time
C:\Users\user>exiftool "-FileName<CreateDate" -d "%Y-%m-%d_%H-%M-%S%%-c.%%e" -ext "xml" C:\hoge
Warning: [minor] Error 3 placing ::NonRealTimeMetaLtcChangeTableLtcChangeStatus in structure or list - C:/hoge/C0001M01.XML
Warning: No writable tags set from C:/hoge/C0001M01.XML
Warning: [minor] Error 3 placing ::NonRealTimeMetaAudioFormatAudioRecPortTrackDst in structure or list - C:/hoge/C0002M01.XML
Warning: No writable tags set from C:/hoge/C0002M01.XML
1 directories scanned
0 image files updated
2 image files unchanged
Second time
C:\Users\user>exiftool "-FileName<CreateDate" -d "%Y-%m-%d_%H-%M-%S%%-c.%%e" -ext "*" C:\hoge
Warning: [minor] The ExtractEmbedded option may find more tags in the movie data - C:/hoge/C0001.MP4
Warning: [minor] Error 3 placing ::NonRealTimeMetaLtcChangeTableLtcChangeStatus in structure or list - C:/hoge/C0001M01.XML
Warning: No writable tags set from C:/hoge/C0001M01.XML
Warning: [minor] The ExtractEmbedded option may find more tags in the movie data - C:/hoge/C0002.MP4
Warning: [minor] Error 3 placing ::NonRealTimeMetaAudioFormatAudioRecPortPort in structure or list - C:/hoge/C0002M01.XML
Warning: No writable tags set from C:/hoge/C0002M01.XML
1 directories scanned
2 image files updated
2 image files unchanged
Added November 22, 2019
I tried the code posted in this link .
C:\Users\user>exiftool -TagsFromFile %d%f.mp4 "-FileName<CreateDate" -ext xml C:\hoge
Warning: Error opening file - C:/mp4data/C0001M01.mp4
Warning: Error opening file - C:/mp4data/C0002M01.mp4
1 directories scanned
0 image files updated
2 image files unchanged
I think the cause of the error is that “.mp4 file name” and “.xml file name” do not match. Since “M01” is always a fixed value, is there any way to batch process it?
C0001.MP4
C0001M01.XML
C0002.MP4
C0002M01.XML