[X] Export and duplicate fields


#1

When I export a file which has duplicate fields (eg. two artists) only one artist is exported. Will it not be better if it exported like "artist1\\artist2"?

ps. Thank you for the wonderful program :wink: It is the best one I have found (and I have practically tried them all).


#2

You can do some sub-loops for those fields that look like this:

$replace(-$loop(%artist%,1)\\%artist%$loopend(),-\\\\,)
or
$replace($loop(%artist%,1)%artist%\\\\$loopend()-,\\\\-,)

Explanation:
With the loop you get each artist from a track once and after/before that, the loop writes an '\\'. Because this is also before/after the first/last artist, you have to write something before/after that (e.g an '-') which you then replace with an $replace.

Then you have all the artists of one track when there is more then one. You can simply put one of the two loops in the place where you want to have the artist-info and as it's possible to nest loops, you won't have any problem. :slight_smile:


#3

thanks for the help.

it seems like it should work, but it doesn't see to.

This is my export file

$filename(csv,utf-16)Album,Artist,Composer,Track,Title,Year,Encoder Settings,Genre,Lyricist,Path,Filename,MD5-Audio,
$loop(%_filename_ext%)"%album%","$loop(%artist%)\\%artist%$loopend()","%composer%","%track%","%title%","%year%","%encodersettings%","%genre%","%lyricist%","%_folderpath%","%_filename_ext%","%_md5audio%",
$loopend()

and it seems like it doesn't enter the sub-loop.