I have a large number of YYMMDD.HHMMSS.mpg files. What I want is to copy the metadata to (the converted) YYMMDD.HHMMSS.mp4 files. Can this be done in batch?
touch -r *.mpg *.mp4
I have a large number of YYMMDD.HHMMSS.mpg files. What I want is to copy the metadata to (the converted) YYMMDD.HHMMSS.mp4 files. Can this be done in batch?
touch -r *.mpg *.mp4
for f in ./*.mpg
do
touch -r "$f" "${f%.mpg}.mp4"
done
... will touch loop over every mpg file and touch the corresponding mp4 file, referencing the mpg file.