what is scripts for select files?
are you using the default template?
if yes, this is going to be javascript.
you can go for an ajax way, and you'll can mimic what the default template does for the "comment" button.
or you can try a more classic submit way. It's up to you.
the current folder is %folder%