How download all realm files for migration from Realm Cloud


I need to migrate from Realm Cloud to MongoDB but I’m stuck for days because I need to download all the realm files .realm to local. I have more than 700 files to download. Is there a script or anything to do it ? I’m trying to develop something in Swift but it doesn’t work as Realm can’t be run on background and download 700 files one byb one is too long.

Thanks a lot for your help.