Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Examples and how to

Calculating file data size using reporting and data export in M-Files

Last updated on 23 November 2023

Admin
M-Files Reporting

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.

image.png

  1. Add the "Size on server" property that is relevant for you (you can add both if you want) to your reporting data set.
  2. 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.

Still need help?

On this page