DirSize
Version 1.1.0.0 (1.38 KB) by
Richard Moore
Determine the size of a folder/directory in bytes, including all subdirectories.
bytes = DirSize('pathOfInterest');
Sometimes I write a script that needs to know how large directories are. I couldn't find a function to already do this, so took a stab at it.
Cite As
Richard Moore (2026). DirSize (https://uk.mathworks.com/matlabcentral/fileexchange/41300-dirsize), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2012b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on File Operations in Help Center and MATLAB Answers
Tags
Acknowledgements
Inspired: DirSizePretty
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
