Sorry, how does your question relate to Online GDB? Is this folder with 40 files you speak of located in Online GDB? When you want to download your projects from Online GDB, it zips the files up for you, so you're only really dealing with a single zip file, not 40 individual files.
If you want to write a piece code that needs to download multiple files, you can just write a loop that gets all the files needed.
Please, provide more details as your question is not clear.