Exchange 1 attached PDF to JPG in multiple DWG files in one folder

Hi,
I am wondering if this is possible. Do you have any hint or advice? I tried something but I was not successful.
I have test PDFs and JPGs in same folder saved with same name.


test1.pdf (107.1 KB)

test2.pdf (82.6 KB)
Výkres1.dwg (473.2 KB)
Výkres2.dwg (473.8 KB)
D4C3D_PDF2JPG_XREF.dyn (6.1 KB)