Hi, Phil,
I'm sorry for disturbing yor with question which seems stupid, but I can't find the answer myself for some days and have to ask your help.
I need to check value of one tag from CR2 file (let it be CanonVDR:rotation tag) and according to this value I need to change another tag in the same CR2 file (EXIF:orientation) and in the JPG (EXIF:orientation too) with the same file name.
For instance, I can do first step: