Batch Project File Operations?

Here’s my predicament:

I need a way to perform ‘x’ scripted/automated actions on an entire folder of Cubase .cpr session files.

I am not aware of any such built-in batch functionality in Cubase. Are there any external software tools anyone has used to, for example:

  • Open a folder of Cubase session files, remove all empty tracks, then re-save all the files.

So far I have designed a rather complicated script in Keyboard Maestro that can do part of this process, but it’s not foolproof and will take hours of hacking/programming to get it just right (to accommodate any number of Cubase error messages or other dialogs that may intervene).