find . -type f -print -exec stat -t -c '%y' {} \; > /tmp/original_dates.txtOn the first set of files, the ones with the correct time.
cat /tmp/original_dates.txt | (while read FILE && read DATE; do echo $FILE; echo $DATE; DATE2=`date -d "$DATE" +%Y%m%d%H%M.%S`; touch -t $DATE2 "$FILE"; done)On the second set of files. This will then set their date as the original.
Labels: Linux