Autorename similar .CR2 and .xmp files

Hello, sorry if there is a needed topic, but i looked a lot and din't find it.
Is there a way to autorename .xmp files corresponding to their .CR2 brothers.
Ex:
_MG_0275.CR2
_MG_0275.xmp
_MG_0276.CR2
_MG_0276.xmp
_MG_0277.CR2
_MG_0277.xmp

may i, renaming CR2 files to numbered or to its shooting time, also rename .xmp the same way
1.CR2
1.xmp
2.CR2
2.xmp
2020-10-10.CR2
2020-10-10.xmp
...

You need to be sure the CR2 and XMP files rename exactly the same way.
I'd suggest separating them into 2 folders: a folder for your RAW files and a folder for yourXMP files.
Then, rename both using the same sequence/pattern for each folder.
Test your method and/or make a copy of the photos and XMP files before you rename them.

The Rename dialog has a "rename matching filenames as one" checkbox for this.

Good to know! Would one need to uncheck 'Ignore Extension'?