I would recommend that you review the HOPEX Power Studio section of our online doc. Specifically HOPEX Power Studio > Using APIs > How to > Import/Export.
Mega Technical Support
In API script use function Import is available on the MegaDatabase object
Of course, you need to write code to browse the folder and identify the files to import