Overview
Sometimes it is necessary to know how much space files are using in the vault. This article covers a method with example of using Reporting and Data Export feature in the M-Files Admin tool to calculate the consumed file data size for the document class.
Note: you need the Reporting module license in your M-Files Server license code to carry out the process described below.
Solution
There are two file size properties that can be added to the data set to check the file size of each individual document. The first one includes the file size for all versions and the other one only for the latest version.
- Add the "Size on server" property that is relevant for you (you can add both if you want) to your reporting data set.
- Run the following query against the reporting database in SQL Server:
SELECT sum (totalfilesize) as 'file size in bytes' FROM dbo.Document WHERE Class_ID = '0'
This should return the file size for the selected class in bytes.
