These may be of some use:
... with the caveat that I haven’t used any of them.
Thanks a lot for your recommendations! Will take a look at them. Thanks!
Even if you could download every file, wouldn't you end up with a bunch of "junk?" How would you know what goes where?
As an alternative, maybe you can consider download the entire database and moodledata contents and install these all on a "local" server. I don't know how big your Moodle is, but I do this myself quite regularly. The entire backup would include all the files within a course, and in the future, someone would know which file belongs to which course.
My local moodle serves as an archive, and it also serves as a place to experiment.
Thanks a lot for your suggestion. What you said make sense. Thanks!