# Getting directory size

**URL:** https://forum.kirupa.com/t/getting-directory-size/223014
**Category:** programming
**Created:** [April 18, 2007, 6:52pm UTC](https://forum.kirupa.com/t/getting-directory-size/223014 "2007-04-18T18:52:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kukorica](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kukorica/32/3527_2.png) [@Kukorica](https://forum.kirupa.com/u/Kukorica)
#### Post date: [April 18, 2007, 6:52pm UTC](https://forum.kirupa.com/t/getting-directory-size/223014/1 "2007-04-18T18:52:58Z")

</div>

Hey all,  
it it possible somehow to get the size of a directory? What I want is an extremely fast and simple code that I save as index.php for example and I put that in a folder lets say into [www.mysite.com/folder. So when I go to [URL=“http://www.mysite.com/folder”]www.mysite.com/folder](http://www.mysite.com/folder) the index.php will print the byte size of the directory, that is the sum of all the files within the directory.  
Thank you.
