# How to calculate size of folder?

**URL:** https://forum.kirupa.com/t/how-to-calculate-size-of-folder/255677
**Category:** programming
**Created:** [March 25, 2008, 9:48pm UTC](https://forum.kirupa.com/t/how-to-calculate-size-of-folder/255677 "2008-03-25T21:48:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)
#### Post date: [March 25, 2008, 9:48pm UTC](https://forum.kirupa.com/t/how-to-calculate-size-of-folder/255677/1 "2008-03-25T21:48:37Z")

</div>

Ok, how would I make a php get the size of a folder…?

What im trying to do is:

Get size of folder with contents  
see if the size of folder is equal to limit
