# Import tag from file path

**URL:** <https://community.mp3tag.de/t/import-tag-from-file-path/51679>\
**Category:** Mac\
**Created:** [January 22, 2021, 2:42am UTC](https://community.mp3tag.de/t/import-tag-from-file-path/51679 "2021-01-22T02:42:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![djdizzle](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ed8c4c/32.png) [@djdizzle](https://community.mp3tag.de/u/djdizzle)\
**Post date:** [January 22, 2021, 2:42am UTC](https://community.mp3tag.de/t/import-tag-from-file-path/51679/1 "2021-01-22T02:42:34Z")

</div>

Hi,

I am creating an action group to import tags from the parent directory.  
`/Volumes/Music/Retagged/Epidemic Sound/ES_777 - Nbhd Nick/ES_777 STEMS MELODY_PN.m4a`

I have tried using

Import Tag Fields  
Source format: `%_folderpath%`  
Formatstring: `/%dummy%/%dummy%/%dummy%/%CONTENTGROUP%/%dummy%_%dummy% - %artist%/%dummy%_%title%_%dummy%`

Is it possible to import /`Epidemic Sound`/ into `%CONTENTGROUP%`, then use the parent directory /`ES_777 - Nbhd Nick`/ for the artist and /`ES_777 STEMS MELODY_PN.m4a` for title as in above formatstring?

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [January 22, 2021, 5:27am UTC](https://community.mp3tag.de/t/import-tag-from-file-path/51679/2 "2021-01-22T05:27:55Z")

</div>

Even though this thread resides in the Mac section, I think the problem lies in the used source.  
The property %\_folderpath% does not contain anything but a path - the parts for the filename are not included.  
So try %\_filename% as source.

---

<div class="post-metadata">

**Author:** ![djdizzle](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ed8c4c/32.png) [@djdizzle](https://community.mp3tag.de/u/djdizzle)\
**Post date:** [January 22, 2021, 3:10pm UTC](https://community.mp3tag.de/t/import-tag-from-file-path/51679/3 "2021-01-22T15:10:26Z")

</div>

I changed `%_folderpath%` to `%_filename%`, and clicked apply... it didn't apply they tags.

---

<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 22, 2021, 3:59pm UTC](https://community.mp3tag.de/t/import-tag-from-file-path/51679/4 "2021-01-22T15:59:15Z")

</div>

Yes, `%_filename%` refers to just the name without the extension.

If you want to access the whole path including the filename, you'd need to use `%_path%` as source format

---

<div class="post-metadata">

**Author:** ![djdizzle](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ed8c4c/32.png) [@djdizzle](https://community.mp3tag.de/u/djdizzle)\
**Post date:** [January 23, 2021, 2:44am UTC](https://community.mp3tag.de/t/import-tag-from-file-path/51679/5 "2021-01-23T02:44:37Z")

</div>

Ah, ok. I didn't see that in the list. Thanks @ohrenkino and @Florian!

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [February 22, 2021, 2:44am UTC](https://community.mp3tag.de/t/import-tag-from-file-path/51679/6 "2021-02-22T02:44:57Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
