Applescript: move all files with a certain extension to the trash
Using your example volume and folder name:
tell application &quot;Finder&quot; to ¬
    move (every item of ¬
        container (alias &quot;DS_30:myfolder&quot;) of ¬
        application &quot;Finder&quot; whose name extension = &quot;WMA&quot;) to trash