Applescript: move all files with a certain extension to the trash This is very straightforward; it moves myfile.WMA to the trash:
tell application &quot;Finder&quot;
    move POSIX file &quot;/Volumes/DS_30/myfolder/myfile.WMA&quot; to trash
end tell

But how would I move all files in myfolder with a extension of .WMA 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