# How to export 2 different folder 2 file size on single .html files

**URL:** https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392
**Category:** General Discussion
**Created:** [July 19, 2018, 3:39pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392 "2018-07-19T15:39:05Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![swarup](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@swarup](https://community.mp3tag.de/u/swarup)
#### Post date: [July 19, 2018, 3:39pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/1 "2018-07-19T15:39:05Z")

</div>

look i have a parent directory name was : new folder  
directory have 2 sub-folder,  
1st folder name was: 128kbps 2nd one: 320kbps  
all tracks and album name was same just different bitrate and file size

i wants export  
2 sub-folder name and both both file size on single line  
like this  
128kbps/filename file size  
320kbps/filename file size

---

<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: [July 19, 2018, 3:45pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/2 "2018-07-19T15:45:50Z")

</div>

which export code have you tried so far?  
It would be especially interesting to see which $loop() statements you use.

---

<div class="post-metadata">

### Author: ![swarup](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@swarup](https://community.mp3tag.de/u/swarup)
#### Post date: [July 19, 2018, 3:50pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/3 "2018-07-19T15:50:07Z")

</div>

```
$filename(MP3List.html)
$loop(%_folderpath%)
<table>
<tr><th>Title</th><th>128Kbps</th><th>320Kbps</th></tr>
$loop(%track%)
<tr>
  <td>
  <strong>%track%. %title%</strong>
  <em>%artist%</em>
  </td>
  <td>
  <strong><a href="$replace(%_directory%,_-_128Kbps,_-_128Kbps,_-_320Kbps,_-_128Kbps)/$replace(%_filename_rel%,\,/)" target="_blank">Download (%_file_size%)</a></strong>
  </td>
  <td>
  <strong><a href="$replace(%_directory%,_-_320Kbps,_-_320Kbps,_-_128Kbps,_-_320Kbps)/$replace(%_filename_rel%,\,/)" target="_blank">Download (%_file_size%)</a></strong>
  </td>
</tr>
$loopend()
</table>
$loopend()

```

**i have this one but i want to add file size name**

---

<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: [July 19, 2018, 4:03pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/4 "2018-07-19T16:03:25Z")

</div>

If you loop by %\_folderpath%, then you get first the files from one folder and then the files from the second folder.  
I would think that either looping by %title% and then by %\_filename% would get an output like you described.  
Or you sort the files already correctly in the files list select them and use an export script that uses $loop(1) which keeps the order of the files in the files list.

To add further information, see the help for other properties variables:

> **[Format Strings and Placeholders – Mp3tag Documentation](https://docs.mp3tag.de/format/#export)**
>
> Documentation on format strings and placeholders to describe the structure of file names and imported data. Mp3tag is the universal Tag Editor.

Perhaps %\_file\_size\_bytes% ist that what you are looking for.

---

<div class="post-metadata">

### Author: ![swarup](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@swarup](https://community.mp3tag.de/u/swarup)
#### Post date: [July 19, 2018, 4:15pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/5 "2018-07-19T16:15:05Z")

</div>

```
$filename(MP3List.html)
$loop(%title%)
<table>
<tr><th>Title</th><th>128Kbps</th><th>320Kbps</th></tr>

<tr>
  <td>
  <strong>%track%. %title%</strong>
  <em>%artist%</em>
  </td>
  <td>
<strong><a href="%_filename_ext%" target="_blank">Download $loop(1)(%_file_size%)$loopend()</a></strong>
  </td>
  <td>
<strong><a href="%_filename_ext%" target="_blank">Download $loop(2)(%_file_size%)$loopend()</a></strong>
  </td>
</tr>

</table>
$loopend()

```

is thats ? its not working just exporting 2nd folder data not exporting both folder data  
i wants to export  
**subfolder 1/%\_filename\_ext% %\_file\_size%**  
**subfollder 2/%\_filename\_ext% %\_file\_size%**

---

<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: [July 19, 2018, 4:43pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/6 "2018-07-19T16:43:22Z")

</div>

I do not see that the $loop(1) and $loop(2) loops go to the next file.  
I would think that is should be enough to have just 1 loop  
`$loop(%_filename_ext%)%_directory%//%_filename_ext% %_file_size%$loopend()`

My assumption: you have the same title in both files - so sorting by title is taken care of at the beginning.  
Now you have a list of titles, each with a filename - now loop (sort) by this filename to output them both.

Try to get the logic right and then add the html stuff.

---

<div class="post-metadata">

### Author: ![swarup](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@swarup](https://community.mp3tag.de/u/swarup)
#### Post date: [July 19, 2018, 4:52pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/7 "2018-07-19T16:52:46Z")

</div>

can u give me example code of $loop(1) and $loop(2)

---

<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: [July 19, 2018, 4:55pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/8 "2018-07-19T16:55:15Z")

</div>

there is one in this thread:

> [@How to split a playlist](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/18):
>
> Perfect. Thank you once again. You solved my problem

---

<div class="post-metadata">

### Author: ![swarup](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@swarup](https://community.mp3tag.de/u/swarup)
#### Post date: [July 19, 2018, 5:50pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/9 "2018-07-19T17:50:45Z")

</div>

please gentore code for me $loop(1) and $loop(2) of file size. i try many ways maybe i was wrong somewhere

---

<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: [July 19, 2018, 6:00pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/10 "2018-07-19T18:00:56Z")

</div>

Could you describe how you get the 2 files next to each other?  
I mean: there must be a way to get that order that you want to have on display in MP3tag.  
So which fields do you sort to get that order?

---

<div class="post-metadata">

### Author: ![swarup](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@swarup](https://community.mp3tag.de/u/swarup)
#### Post date: [July 19, 2018, 6:03pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/11 "2018-07-19T18:03:20Z")

</div>

> [@ohrenkino](#):
>
> Could you describe how you get the 2 files next to each other?

no ,, i don not know

---

<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: [July 19, 2018, 6:19pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/12 "2018-07-19T18:19:32Z")

</div>

if you want to get 2 files next to each other in an export then it has to be possible to do just that in MP3tag without the export script.  
If you then use the export script, it is possible to use a special sorting order, other than that of the files list - this is described by the $loop() statements - or you use the same order as in the files list - this then requires the rather special statement $loop(1) (which means "please sort the number 1" which does not do any sorting at all but takes the files in the order as found).

So either you have the list ready with the 2 similar files next to each other - or you have to sort it in the export script.  
So which way is your's?

---

<div class="post-metadata">

### Author: ![swarup](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@swarup](https://community.mp3tag.de/u/swarup)
#### Post date: [July 19, 2018, 6:29pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/13 "2018-07-19T18:29:30Z")

</div>

i cant understood the function  
i wants to just exporting both folder name and filename file size a single files

---

<div class="post-metadata">

### Author: ![swarup](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@swarup](https://community.mp3tag.de/u/swarup)
#### Post date: [July 19, 2018, 6:32pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/14 "2018-07-19T18:32:27Z")

</div>

```
$filename(MP3List.html)

$loop(1)%_directory%/%_filename_ext% %_file_size% $loopend()

$loop(2)%_directory%/%_filename_ext% %_file_size% $loopend()

```

if i try this its just exporting subfolder 2 data not exporting both files folder data

---

<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: [July 19, 2018, 6:35pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/15 "2018-07-19T18:35:19Z")

</div>

Yes. Because it does not make sense.  
`$loop(1)%_directory%/%_filename_ext% %_file_size% $loopend()`  
should be enough  
No $loop(2)

---

<div class="post-metadata">

### Author: ![swarup](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@swarup](https://community.mp3tag.de/u/swarup)
#### Post date: [July 19, 2018, 6:38pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/16 "2018-07-19T18:38:32Z")

</div>

`$loop(1)%_directory%/%_filename_ext% %_file_size% $loopend()`  
this code not giving me both filesname and filesize and folder name data  
just exporting subfolder 2 data

---

<div class="post-metadata">

### Author: ![swarup](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@swarup](https://community.mp3tag.de/u/swarup)
#### Post date: [July 19, 2018, 6:39pm UTC](https://community.mp3tag.de/t/how-to-export-2-different-folder-2-file-size-on-single-html-files/42392/17 "2018-07-19T18:39:41Z")

</div>

opps sry  
i was maked on  
One per directory
