Oh! Forget guys my message above!
The calling of Python code from C++ plugin in @kbar 's advice does the trick!
If someone from the future who will read this thread will need the code example, I just use the code snippet from here: https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_maxonapi_python.html
and feed to it this code:
// call it from somewhere
String code = "import c4d\nimport maxon\nimport os ";
code+= "\n\nprint(f'This is simple message')";
code += "\nos.rename('C:/Code/sdk/plugins/myPlugin/myPlugin.xdl64', 'C:/Code/sdk/plugins/myPlugin/old_myPlugin.old')";