# non-relative playlist without drive letter?

**URL:** <https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986>\
**Category:** Support\
**Created:** [December 30, 2007, 4:42pm UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986 "2007-12-30T16:42:19Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubwise](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/f6c823/32.png) [@dubwise](https://community.mp3tag.de/u/dubwise)\
**Post date:** [December 30, 2007, 4:42pm UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/1 "2007-12-30T16:42:19Z")

</div>

Is there a way to write absolute playlists,  
not relative to the work directory,  
but without the drive letter?  
My USB player may show up as any drive.  
I'd like each playlist to work from anywhere on that drive.  
My desired formatting looks like this, with no leading "." or drive letter.

\tunes\TWINPEAKS\Angelo Badalamenti - Twin Peaks Theme.mp3  
\tunes\TWINPEAKS\Angelo Badalamenti - Laura Palmer's Theme.mp3  
\tunes\TWINPEAKS\Angelo Badalamenti - Audrey's Dance.mp3  
\tunes\TWINPEAKS\Angelo Badalamenti - The Nightingale.mp3

---

<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:** [December 31, 2007, 8:43am UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/2 "2007-12-31T08:43:31Z")

</div>

> [@dubwise](#):
>
> ... Is there a way to write absolute playlists, not relative to the work directory, but without the drive letter?...

You may try something like this, adapt it to your needs:  
**$regexp(%\_folderpath%,^\u:(.\*)$,$1)**

DD.20071231.1043.CET

---

<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:** [December 31, 2007, 10:51am UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/3 "2007-12-31T10:51:37Z")

</div>

> [@DetlevD](#):
>
> You may try something like this, adapt it to your needs:  
> **$regexp(%\_folderpath%,^\u:(.\*)$,$1)**

Maybe you should add the missing bit of information, that this format string can be used within the Export function.

Kind regards,  
Florian

---

<div class="post-metadata">

**Author:** ![dubwise](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/f6c823/32.png) [@dubwise](https://community.mp3tag.de/u/dubwise)\
**Post date:** [December 31, 2007, 2:28pm UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/4 "2007-12-31T14:28:39Z")

</div>

Thank you , gentlemen. I'll give that a shot.

---

<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:** [December 31, 2007, 2:33pm UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/5 "2007-12-31T14:33:09Z")

</div>

You can try this one $filename(m3u)#EXTM3U

```
$loop(%track%)#EXTINF:%_length_seconds%,%artist% - %title%
$regexp(%_folderpath%,^\u\:(.*)$,$1)%_filename_ext%
$loopend()
```

---

<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:** [February 18, 2008, 5:16pm UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/6 "2008-02-18T17:16:30Z")

</div>

Intreresting... line line 3, what's the purpose of the \ before the : ?

---

<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:** [February 18, 2008, 5:54pm UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/7 "2008-02-18T17:54:23Z")

</div>

chrisjj, I think it is not forbidden to escape any literal character used in a regular expression, so I did escape the ~~semi~~ colon for sure too.

DD.20080218.1952.CET

---

<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:** [February 18, 2008, 6:13pm UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/8 "2008-02-18T18:13:15Z")

</div>

Aha - I just thought I might have missed a requirement. And though : -\> undefined behaviour, I agree it seems safe.

BTW, I think most concise is: $regexp(%\_folderpath%,^.:,)%\_filename\_ext%

EDIT: " though : -\> undefined behaviour " is incorrect:

[http://www.boost.org/doc/libs/1\_55\_0/libs/...erl\_syntax.html](http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html)

> [@](#):
>
> Any other escape sequence matches the character that is escaped, for example @ matches a literal '@'.

above which **:** is not listed

---

<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 6, 2014, 4:34am UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/9 "2014-09-06T04:34:54Z")

</div>

> [@dubwise](#):
>
> Is there a way to write absolute playlists ... without the drive letter? ...  
> \tunes\TWINPEAKS\Angelo Badalamenti - The Nightingale.mp3

Since Mp3tag v2.47 [2010-11-19]: **$cutLeft(%\_path%,2)**

DD.20140906.0834.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:** [September 6, 2014, 10:36am UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/10 "2014-09-06T10:36:16Z")

</div>

> [@DetlevD](#):
>
> Since Mp3tag v2.47 [2010-11-19]: **$cutLeft(%\_path%,2)**

Note: on a UNC name, that gives an illegal path. At the pointer here:

Whereas the original does nothing.

One solution is **$regexp(%\_path%,'^\u:|^\\[^\\]+',)** :

---

<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:20pm UTC](https://community.mp3tag.de/t/non-relative-playlist-without-drive-letter/5986/11 "2026-02-09T12:20:40Z")

</div>

Closed on February 9, 2026, 12:20pm UTC


