Adding album file size and length totals

I use MP3TAG almost exclusively for my audiobook collection. I currently export an RTF file with the following data to the book folder. As most of the books are split into multiple files I only extract from the first file however that makes the files size and length data irrelevant. Is there a way to add the totals of the .mp3 files within the folder to give an album/book size and length? I don't really know what I am doing but have figured out this much by trial and error.

$loop(%_filename_ext%)
Book Title: \b %title%\b0\par
Series: \b %album%\b0\par
Author: \b %artist%\b0\par
Narrator: \b %albumartist%\b0\par
Year: \b %year%\b0\par
Audio Publication: \b %origyear%\b0\par
Genre: \b %genre%\b0\par
Length: \b %_length%\b0\par
Size: \b %_total_size%\b0\par
Bitrate: \b %_bitrate% %_vbr%\b0\par
Sample Rate: \b %_samplerate%\b0\par
Type: \b %_extension%\b0\par
Codec: \b %_codec% %_tool%\b0\par
Comment: \b %comment%\b0\par
\par
$loopend()

Regards

My apologies. Maybe I should have posted this in the Export subforum but I can't work out how to move the post??

See this thread for %_total_time%
Album Length

Thanks a heap for the link. I managed to work out how to get total size and total time to work within the context of my export RTF however I can't work out how to make it limit to one entry. I see the (%fieldname%,num) but can't figure out how to use it in this context and end up with multiple entries when (as all tags are identical between the files except track #) I don't require the duplicates. Here is what I have. Any suggestions would be appreciated.

$loop(%_folderpath%,1)$puts(album_time,%_total_time%)$loopend()
$loop(%_folderpath%,1)$puts(album_size,%_total_size%)$loopend()
$loop(%_filename_ext%,1)
Book Title: \b %title%\b0\par
Series: \b %album%\b0\par
Author: \b %artist%\b0\par
Narrator: \b %albumartist%\b0\par
Book Year: \b %year%\b0\par
Audio Year: \b %origyear%\b0\par
Genre: \b %genre%\b0\par
Book Length: \b $get(album_time)\b0\par
Book Size: \b $get(album_size)\b0\par
Bitrate: \b %_bitrate% %_vbr%\b0\par
Sample Rate: \b %_samplerate%\b0\par
Audio Type: \b %_extension%\b0\par
Audio Codec: \b %_codec% %_tool%\b0\par
Comment: \b %comment%\b0\par
\par
$loopend()
\par
}

are these $loop() ....

really necessary, if you want to go through the data only once?

I have no idea. I created this by experimentation and borrowing from other examples. I have no idea how it actually works. I tried to use some logic but that only takes you so far. Reading the help file is somewhat helpful however I am coming from the place of a complete amateur.

Then please try to leave them out.

I'm not really sure what you are telling me to leave out because the export doesn't work when I delete the extra loop commands. I copied them from the example you linked to and they work. Are you saying they are causing the duplication?

EDIT: OK I get what you meant and got it working. Thanks