Hmm, well, I’ve made some progress. Now the script will open and export “blah.xcf” as “blah.xcf.png”. But if run again it will also open and export “blah.xcf.png” as “blah.xcf.xcf.png”.
The problem is obvious (“extension=
echo "$i" | cut -d'.' -f2
”). I’m working on a solution.