# Conditional folder renaming

**URL:** https://community.mp3tag.de/t/conditional-folder-renaming/13840
**Category:** General Discussion
**Created:** [September 4, 2012, 7:12pm UTC](https://community.mp3tag.de/t/conditional-folder-renaming/13840 "2012-09-04T19:12:17Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [September 5, 2012, 5:14am UTC](https://community.mp3tag.de/t/conditional-folder-renaming/13840/6 "2012-09-05T05:14:20Z")

</div>

> [@JJ Johnson](#):
>
> Mp3tag can't determine if a folder already exists. ...

Yes. Mp3tag currently provides no $FileExist() or $FolderExist() functions.

> [@JJ Johnson](#):
>
> ... It can only read the parent and grandparent folder names. ...

Yes, but not quite right.  
Mp3tag provides two system related pseudo tag-fields ...  
%\_directory% ... the name of the home folder of the media file;  
%\_parent\_directory% ... the name of the folder of the home folder of the media file.

Beside that it is possible to evaluate the complete folderpath, for each folder item, by using the Mp3tag scripting language and actions as described there ...  
[Easy way to get directory names above Parent?](https://community.mp3tag.de/t/9324/6)  
[unterschiedlicher Aufbau von Dateinamen](https://community.mp3tag.de/t/12021/4)

DD.20120905.0935.CEST

---

_[View the full topic](https://community.mp3tag.de/t/conditional-folder-renaming/13840)._
