# Folder count

**URL:** https://community.mp3tag.de/t/folder-count/2414
**Category:** General Discussion
**Created:** [October 26, 2005, 6:21am UTC](https://community.mp3tag.de/t/folder-count/2414 "2005-10-26T06:21:47Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [October 26, 2005, 6:21am UTC](https://community.mp3tag.de/t/folder-count/2414/1 "2005-10-26T06:21:47Z")

</div>

Can you write function that can count folders from string (%\_path%, %\_workingpath%...)?

Examples:

**$foldercount** (G:\Music\Progressive Trance\Sasha And John Digweed - Communicate\Sasha And John Digweed - Communicate Cd 1)  
RETURNS NUMBER **4**

**$foldercount** (G:\Music\Progressive Trance\Avalanche Of Sound Vol.3)  
RETURNS NUMBER **3**

**$foldercount** (%\_workingpath%)  
RETURNS NUMBER **2**  
%\_workingpath% = G:\Music\Progressive Trance\

You can use "" as separator.

~ Thanks, milka.

---

<div class="post-metadata">

### Author: ![squonk63](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/8dc957/32.png) [@squonk63](https://community.mp3tag.de/u/squonk63)
#### Post date: [October 26, 2005, 6:57am UTC](https://community.mp3tag.de/t/folder-count/2414/2 "2005-10-26T06:57:04Z")

</div>

> [@](#):
>
> Can you write function that can count folders from string (%\_path%, %\_workingpath%...)?

Maybe $folderlevel or $folderdepth is a more appropriate name for such a function, because $foldercount seems to refer to the number of subdir in a given path...

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [November 3, 2005, 12:13pm UTC](https://community.mp3tag.de/t/folder-count/2414/3 "2005-11-03T12:13:03Z")

</div>

This should be possible ... I'm not sure, if it'll make it to the next release.

Best regards,  
~ Florian

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [January 7, 2006, 3:16pm UTC](https://community.mp3tag.de/t/folder-count/2414/4 "2006-01-07T15:16:35Z")

</div>

The new function $folderdepth(_path_) is scheduled to the next release.

Examples:  
$folderdepth(C:) =\> 0  
$folderdepth(C:\folder1\folder2) =\> 2

Best regards,  
~ Florian

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [January 7, 2006, 3:25pm UTC](https://community.mp3tag.de/t/folder-count/2414/5 "2006-01-07T15:25:10Z")

</div>

Thanks man ![:w00t:](https://community.mp3tag.de/uploads/default/original/1X/cb01eca72fe9339ff6f3ec9f1e3c5fe002be0f0a.gif ":w00t:")

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [January 20, 2006, 7:32pm UTC](https://community.mp3tag.de/t/folder-count/2414/6 "2006-01-20T19:32:54Z")

</div>

The new function is implemented with the latest [Development Build](http://developer.mp3tag.de) 🙂

Best regards,  
~ Florian

---

<div class="post-metadata">

### Author: ![milka](https://community.mp3tag.de/user_avatar/community.mp3tag.de/milka/32/55_2.png) [@milka](https://community.mp3tag.de/u/milka)
#### Post date: [January 21, 2006, 8:34am UTC](https://community.mp3tag.de/t/folder-count/2414/7 "2006-01-21T08:34:22Z")

</div>

Thanks again, I can't wait to try it. 🙂
