by Lazaros Sotiriadis.
Hi,
Thank you for the comments,
Thank you for the comments,
I have implemented what Simon asked and pushed it to my git branch CLI_RESTORE_MOODLE_38_STABLE.
As Simon suggested, if you pass a directory and a categoryid as an option then it mass restores all .mbz files found on the directory given to the category given, overwriting existing and creating new courses if they don't exist.
On the other hand if you pass a file as a source then you can either specify a courseid or a shortname to find and overwrite, or you can specify a categoryid to overwrite or create in that category with specific shortname (if also provided)
I haven't finished the tests but it seems working as expected. Ignore my previus attachment and get the one from my branch if you like to test it (use this link).
Yes I have to open a new issue as well.
Regards,
Lazaros