Accessing files is not trivial unfortunately. Have a look here, I am trying to zip all the files students and teachers may access in the courses they are enrolled:
https://moodle.org/mod/forum/discuss.php?d=218220
Rosario (I need another few days/weeks to find a good and safe solution)