# Exporting subdirectories and paths in any format!

**URL:** <https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360>\
**Category:** Support\
**Created:** [December 11, 2022, 10:22am UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360 "2022-12-11T10:22:44Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![zach](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/51bf81/32.png) [@zach](https://community.mp3tag.de/u/zach)\
**Post date:** [December 11, 2022, 12:11pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/21 "2022-12-11T12:11:12Z")

</div>

[html\_standard.mte](https://community.mp3tag.de/uploads/short-url/nBntWtNqBwXOhYUFkOIhyfRVmCu.mte) (2.0 KB)  
closing the program and reposting

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [December 11, 2022, 12:12pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/22 "2022-12-11T12:12:59Z")

</div>

This is what we see (excluded the `<head>` styling part)

```auto
<body>
	<h1>Mp3tag - File Overview</h1>
	<p>%_date%</p>
	<table>
		<tr>
			<th class="title">Title</th>
			<th class="title">Artist</th>
			<th class="title">Album</th>
			<th class="title">Track</th>
			<th class="title">Year</th>
			<th class="title">Genre</th>
			<th class="title">Filename</th>
		</tr>

$loop(%_filename_ext%)
		<tr>
			<td$if($odd(%_counter%), class="odd",)>$replace(%title%,&,&amp;)</td>
			<td$if($odd(%_counter%), class="odd",)>$replace(%artist%,&,&amp;)</td>
			<td$if($odd(%_counter%), class="odd",)>$replace(%album%,&,&amp;)</td>
			<td$if($odd(%_counter%), class="odd",)>$replace(%track%,&,&amp;)</td>
			<td$if($odd(%_counter%), class="odd",)>$replace(%year%,&,&amp;)</td>
			<td$if($odd(%_counter%), class="odd",)>$replace(%genre%,&,&amp;)</td>
			<td$if($odd(%_counter%), class="odd",)>$replace(%_filename_ext%,&,&amp;)</td>
		</tr>
$loopend()

	</table>
	<p>built on %_date% with %_app% - the universal Tag Editor <a href="http://www.mp3tag.de/en/" title="Mp3tag Website">www.mp3tag.de</a></p>
</body>

```

There is no `%_path%` in your file. Not in the the column titles, not in the loop and not in the outputted lines itself.

---

<div class="post-metadata">

**Author:** ![zach](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/51bf81/32.png) [@zach](https://community.mp3tag.de/u/zach)\
**Post date:** [December 11, 2022, 12:14pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/23 "2022-12-11T12:14:07Z")

</div>

[html\_standard(1).rar](https://community.mp3tag.de/uploads/short-url/eWNS7Ztgtk2qZiNVZTuTVFJZetH.rar) (901 Bytes)  
Please see that

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [December 11, 2022, 12:14pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/24 "2022-12-11T12:14:53Z")

</div>

No difference, same file.

Are you sure that you pick up the correct file from the current Mp3tag configuration location?

 ![image](https://community.mp3tag.de/uploads/default/original/2X/7/774d5d30f538f6a0c00067406d4a81ce9fb04058.png)

From the folder openend in your windows explorer, change to the `\export` subfolder.  
There you can find your current export \*.mte

---

<div class="post-metadata">

**Author:** ![zach](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/51bf81/32.png) [@zach](https://community.mp3tag.de/u/zach)\
**Post date:** [December 11, 2022, 12:36pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/25 "2022-12-11T12:36:45Z")

</div>

hank you  
the problem lies absolutely in the **wrong directory .**  
I used the files under the **mp3tag /export directory** that for unknown reason could be updated but then restored back to its default form due to **admin rights**  
I copied the file in another directory and did again all the corrections with the same happening  
Finally the folder under the _appdata /roaming_ folder soled this awkward problem by just coping the updated file there ( **no adming rights** )

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [December 11, 2022, 12:39pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/26 "2022-12-11T12:39:18Z")

</div>

Could you please show us your final working export script - just for the people finding this thread and interested in your solution. 😉

---

<div class="post-metadata">

**Author:** ![zach](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/51bf81/32.png) [@zach](https://community.mp3tag.de/u/zach)\
**Post date:** [December 11, 2022, 12:43pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/27 "2022-12-11T12:43:00Z")

</div>

```
<h1>Mp3tag - File Overview</h1>
<p>%_date%</p>
<table>
	<tr>
		<th class="title">Path</th>
		<th class="title">Title</th>
		<th class="title">Artist</th>
		<th class="title">Album</th>
		<th class="title">Track</th>
		<th class="title">Year</th>
		<th class="title">Genre</th>
		<th class="title">Filename</th>
	</tr>

```

$loop(%\_path%)

```
		<td$if($odd(%_counter%), class="odd",)>$replace(%_path%,&,&amp;)</td><td$if($odd(%_counter%), class="odd",)>$replace(%title%,&,&amp;)</td>
		<td$if($odd(%_counter%), class="odd",)>$replace(%artist%,&,&amp;)</td>
		<td$if($odd(%_counter%), class="odd",)>$replace(%album%,&,&amp;)</td>
		<td$if($odd(%_counter%), class="odd",)>$replace(%track%,&,&amp;)</td>
		<td$if($odd(%_counter%), class="odd",)>$replace(%year%,&,&amp;)</td>
		<td$if($odd(%_counter%), class="odd",)>$replace(%genre%,&,&amp;)</td>
		<td$if($odd(%_counter%), class="odd",)>$replace(%_filename_ext%,&,&amp;)</td>
	</tr>

```

$loopend()

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [December 11, 2022, 12:49pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/28 "2022-12-11T12:49:04Z")

</div>

The final working script as complete \*.mte file attachment would be nice too. 😉

---

<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:** [December 11, 2022, 12:51pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/29 "2022-12-11T12:51:35Z")

</div>

> [@zach](#):
>
> I used the files under the **mp3tag /export directory**

I assumed that you used the File\>Export... Edit function.  
That would have opened the correct file immediately.  
The file system approach is, as you see, full of chances for errors.  
Also, I would delete the data folder from the program folder so that you do not get mixed up again.

---

<div class="post-metadata">

**Author:** ![zach](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/51bf81/32.png) [@zach](https://community.mp3tag.de/u/zach)\
**Post date:** [December 11, 2022, 1:26pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/30 "2022-12-11T13:26:28Z")

</div>

NOw a small help once again  
I removed some useless tags and made my 'exportings'  
the minor problem is that the sorting is not exactly on what i expected . Sorting is made by directory then by file name  
what i have to change so sorting ca be made by title or filename?  
thanks once again !

---

<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:** [December 11, 2022, 1:34pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/31 "2022-12-11T13:34:14Z")

</div>

> [@zach](#):
>
> ca be made by title or filename?

You would need 2 different export scripts as you cannot choose in the middle of the export how to sort.  
Please see the documentation on export

> **[Exporting Tag and File Information – Mp3tag Documentation](https://docs.mp3tag.de/export/)**
>
> Documentation on exporting tag and file information to text-based file formats. Mp3tag is the universal Tag Editor.

and which role the $loop() instruction plays in respect to sorting.  
Please note that you can stack $loop() statements so that you first sort by ARTIST, then by ALBUM and inside that album by TRACK.  
This would require 3 $loop()s.  
If you sort by \_PATH then this includes already the filename.  
If you only want to get the folder name, try \_FOLDERPATH or \_DIRECTORY.  
If you want to sort files with the same \_FOLDERPATH or \_DIRECTORY, insert another $loop() for the next criterion.

---

<div class="post-metadata">

**Author:** ![zach](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/51bf81/32.png) [@zach](https://community.mp3tag.de/u/zach)\
**Post date:** [December 11, 2022, 1:43pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/32 "2022-12-11T13:43:42Z")

</div>

OK this worked just by using title !

---

<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:** [January 10, 2023, 1:43pm UTC](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360/33 "2023-01-10T13:43:55Z")

</div>

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

[Previous page](https://community.mp3tag.de/t/exporting-subdirectories-and-paths-in-any-format/59360.md?page=1)
