I need to slim down my moodledata folder and by extension the filedir folder used by Moodle repository but as the txt file in there warns me
"This directory contains the content of uploaded files and is controlled by Moodle code. Do not manually move, change or rename any of the files and subdirectories here."
So how do I go about finding orphan files or old files I can safely delete. My hosting system can identify the large file but is there an easy tool which will tell me where in Moodle they are used?
A few of the files are over 3GB in size but their filetype is text/generic because of Moodle's hashing of the filename and the last modified time stamp is fairly old but obviously I want to clean it up correctly not just delete and pray
Whats tools/methods are available to help me do this site wide?
The contenthash column is the name of the file on the disk. The other columns tell you the name if the module it belongs to and the context id (plus the mdl_context and mdl_course_modules tables) will help to identify specific activities.
Once identified you can delete the unwanted activities within Moodle. Note that files are automatically deleted when activities are deleted, so there shouldn't be any 'orphaned' files hanging around.
Thanks I'll try out but I would have thought there would be a more elegant way to manage the size and contents of filedir from within moodle admin. Maybe a smart coder could come up with the feature for future moodle versions to list repository content by course and by activity so the moodle admin can tell which courses are using the most disk.
Am I correct in saying that plugin needs Moodle to be running on IIS to work?
To avoid complexity I would like to avoid opening up my site too much if possible and would settle for a simple sortable table of files in moodle in the admin menu
|File Name||Size (MB)||Date Created||Date Modified/Last accessed||Location in Moodle||Location on Disk||Referenced in Multiple Locations (Yes/No)||Owner|
Does the files table have 1 record per file or 1 record per reference to a file? I have seen rows which have similar filenames & sizes but amn't sure