Report of files of all users

Hello. I have a CMS with thousand of users and I am thinking in owncloud to give to each user a directory to upload files. My question here is, how can I get a report of files of all users?. Thanks in advance.

Hi cigotete,

You may need to retrieve this information from your DB and specifically from the oc_filecache table. Note that this table also includes the different versions (if any) of the files and files in trashbin as well. So if you want to filter out this information something like this would probably help:

SELECT * FROM oc_filecache WHERE path LIKE 'files/%';

If you want to retrieve the files for a specific user you may need first to retrieve the storage id for this specific user from the oc_storages table (column numeric_id) and then expand the query above like this (where $id comes from the oc_storages table):

SELECT * FROM oc_filecache WHERE path LIKE 'files/%' AND storage=$id;

Hope this helps.

Hi @pako81, thanks for your helpful answer, I will user your indications.
Thanks again.