Running a command on multiple selected files in nautilus script

I am trying to make a script to convert drg files to wav and so far i have this

#!/bin/bash
drg2sbg "$*" -o "$*".sbg
sbagen -Wo "/home/nick/Desktop/I-Doser Wave Files/"$*"" "$*".sbg
rm "$*".sbg
cd "/home/nick/Desktop/I-Doser Wave Files"
rename 's/\.drg$/\.wav/' *.drg
exit

the drg2sbg and sbagen commands are right, but I don't know how to make this work for multiple files by running each file through these commands one at a time. Does anyone have an idea of the commands needed? Also if you could post a revised version of my script with the needed commands it would be appreciated. Thanks in advance.

I don't know how the commands in your script work, but the way to loop though a bunch of files is:

for file in *.bsg
do
  : do whatever with "$file"
done

Thanks so much for the help! I modified my code to make a normal shell file instead of a nautilus script and ended up with this

#!/bin/bash
cd "/home/nick/Desktop/Dose Files"
for file in *.drg
do
drg2sbg "$file" -o "$file".sbg
sbagen -Wo "/home/nick/Desktop/I-Doser Wave Files/"$file"" "$file".sbg
rm "$file".sbg
done
cd "/home/nick/Desktop/I-Doser Wave Files"
rename 's/\.drg$/\.wav/' *.drg

and just put the files i want to convert in /home/nick/Desktop/Dose Files. Thanks for the help those few commands were exactly what i needed.