Reversing the order

I'm trying to export a list of mp3 tags into a template I've built for an XML file. The problem is that I need to reverse the order of the loop so they appear in the proper order. I've searched the forums and found a $reverse function, but I admit, I don't know where it goes. So for example:

$filename(New_export_file.xml,utf-8)<?xml version="1.0" encoding="UTF-8"?>
<rss 
    xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" 
    xmlns:media="http://search.yahoo.com/mrss" 
    version="2.0">
    <channel>
        <title>Real FamilyLife with Dennis Rainey</title>
        <description>Life may be hard... but the precepts of the LORD are right, giving joy to the heart (Psalm 19:8). Real FamilyLife with Dennis Rainey, provides godly wisdom for life&apos;s toughest questions.</description>
<link>http://www.familylife.com</link>
    $loop(%_filename_ext%)
            <item>
            <title>%title%</title>
            <description>%comment%</description>
            <link>http://www.familylife.com/page.htm</link>
            <enclosure url="http://d1ekldu2q29g.cloudfront.net/%_filename_ext%" length="%_file_size_bytes%" type="audio/mpeg"/>
            <pubDate>%pubdate%</pubDate>
            <itunes:duration>%_length%</itunes:duration>
            <itunes:author>%artist%</itunes:author>
            <itunes:explicit>no</itunes:explicit>
            <itunes:block>no</itunes:block>
            </item>
$loopend()
    </channel>
</rss>

Where shall I put the $reverse function? And would it look like $reverse(%_filename%)? Thanks in advance for any help!

The Mp3tag scripting function $reverse(x) reverses the order of the characters in the string x.
See also ...
https://docs.mp3tag.de/scripting

Do you want to get file names sorted in descending order in an export script?
What's what you get when the file names are sorted in descending order?

The Mp3tag export scripting function $loop() ... $loopend() does only ascending sorting.

DD.20111118.1155.CET