# Importing filepath-propertyvalue pairs

**URL:** https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730
**Category:** Support
**Created:** [August 28, 2010, 9:55am UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730 "2010-08-28T09:55:53Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [August 28, 2010, 9:55am UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730/1 "2010-08-28T09:55:53Z")

</div>

I would like the best way to tag a library from a large (e.g. 1Mb) textfile consisting of a list of filepath-propertyvalue pairs e.g.

```
S:\TLIB\07798105810046\1\1.WMA Concierto en la luna
S:\TLIB\07798105810046\1\3.WMA Loca bohemia
...

```

where the filepath is the path of the file that is to have the propertyvalue written to a certain fixed field e.g. Title.

For smaller lists I have imported the entire textfile into the propertyfield and then used string functions to remove all but the matching propertyvalue, but that would be very slow for a 1Mb list.

Thanks.

---

<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: [August 28, 2010, 3:20pm UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730/2 "2010-08-28T15:20:07Z")

</div>

QUOTE (chrisjj @ Aug 28 2010, 13:55) \<{POST\_SNAPBACK}\>

I would like the best way to tag a library from a large (e.g. 1Mb) textfile consisting of a list of filepath-propertyvalue pairs e.g.

```
S:\TLIB\07798105810046\1\1.WMA Concierto en la luna
S:\TLIB\07798105810046\1\3.WMA Loca bohemia
...

```

where the filepath is the path of the file that is to have the propertyvalue written to a certain fixed field e.g. Title.

For smaller lists I have imported the entire textfile into the propertyfield and then used string functions to remove all but the matching propertyvalue, but that would be very slow for a 1Mb list.

Thanks.

  
Do it as Mp3tag provides it.  
On each line of the source file enclose each item into double apostrohes and delimit each item by an unique character to build a CSV like data record line.  
For example:  
**"S:\TLIB\07798105810046\1\1.WMA"|"Concierto en la luna"**

Import the file, which contains all the prepared lines, into Mp3tag using "Convert/Textfile - Tag" together with a Formatstring like this:  
**"%\_PATH%"|"%TITLE%"**

This should fill the TITLE string into the relating file.

DD.20100828.1920.CEST  
Edit. Misspelling on Formatstring corrected.  
DD.20100829.0215.CEST

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [August 28, 2010, 5:04pm UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730/3 "2010-08-28T17:04:30Z")

</div>

> [@DetlevD](#):
>
> Do it as Mp3tag provides it.... with a Formatstring like this:  
> '"'%\_PATH%'"|"'%TITLE%'"'

Wow. No mention in the docs that Textfile-Tag actually searches for a match on \_path!

> [@](#):
>
> This should fill the TITLE string into the relating file.

Thanks D, but it doesn't work for me e.g.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [August 28, 2010, 5:07pm UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730/4 "2010-08-28T17:07:39Z")

</div>

.....

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [August 28, 2010, 5:22pm UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730/5 "2010-08-28T17:22:04Z")

</div>

But it does work if I remove the format string's single quotes:

[![](http://img693.imageshack.us/img693/3933/piczk.png)](http://img693.imageshack.us/i/piczk.png/)

Thanks!

I guess this failure of single quotes to act special is a bug?

---

<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: [August 28, 2010, 10:38pm UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730/6 "2010-08-28T22:38:18Z")

</div>

> [@chrisjj](#):
>
> But it does work if I remove the format string's single quotes: ... I guess this failure of single quotes to act special is a bug?

chrisjj, I beg your pardon for the inconvenience.  
I've edit the misspelling in my post from above and removed the single quotes.  
The single quotes have crept in by my efforts to consistency in Mp3tag scripting too.  
As you discovered, the format string rules are partly different from the scripting rules.  
(It seems so, that ) ... all characters within a Formatstring, beside the placeholders, are taken "as is", so that an inserted special single character or character string must not be enclosed by single quotes.  
Example:  
Formatstring: **"%\_PATH%"|"%TITLE"**  
... is correct and will fit to ...  
Fileline: **"S:\TLIB\07798105810046\1\3.WMA"|"Loca bohemia"**

DD.20100829.0238.CEST

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [August 29, 2010, 7:45am UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730/7 "2010-08-29T07:45:30Z")

</div>

> [@DetlevD](#):
>
> As you discovered, the format string rules are partly different from the scripting rules.

What we have is some format strings using different rules from others.

e.g. in **Convert Text file - Tag** and **Convert Filename - Tag** single quote means single quote, whereas in **Convert Tag - Filename** and e.g. **Action Format value** single quote means "Output raw text".

This fits with the fact that the first type doesn't allow scripting and the second does. So I guess this is not a bug after all. But both are lablled the same on the UI - you have to look in the Help to discover there are two different types.

This is confusing and error-prone. I think the UI labels should distinguish the two types e.g. "Format string (not scriptable):" and "Format string (scriptable):".

---

<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: [August 29, 2010, 3:12pm UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730/8 "2010-08-29T15:12:56Z")

</div>

> [@chrisjj](#):
>
> What we have is some format strings using different rules from others.  
> e.g. in **Convert Text file - Tag** and **Convert Filename - Tag** single quote means single quote, whereas in **Convert Tag - Filename** and e.g. **Action Format value** single quote means "Output raw text".  
> This fits with the fact that the first type doesn't allow scripting and the second does. ... This is confusing and error-prone. I think the UI labels should distinguish the two types e.g. "Format string (not scriptable):" and "Format string (scriptable):".

Good point!  
My vote +1 for adding this to the UI and into the manual.

DD.20100829.1912.CEST

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [August 29, 2010, 5:08pm UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730/9 "2010-08-29T17:08:52Z")

</div>

Why are you using quotes?

%\_path% | %title%  
also does it.

---

<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 9, 2026, 12:22pm UTC](https://community.mp3tag.de/t/importing-filepath-propertyvalue-pairs/10730/10 "2026-02-09T12:22:31Z")

</div>


