in reply to form cgi

Simply put, you can't make the scenario you outlined work as you expressed it. See cbrandtbuffalo's reply above for one reason why.

Here's another (also with caveat that you might be able to do something (extremely risky) with jscript): the
<INPUT TYPE="file" NAME="data2">
determines what your (server-side) script expects AND uses.

And are you really hopeing to upload to TWO different sites, "processdata1.com" and "processdata2.com" from a single script? To me, that suggests MASSIVE security gaps, among other, more mundane problems.

Using two forms can be tricky and can certainly provide more opportunities for user_errors. Nonetheless, it may still be more nearly foolproof than asking users to (correctly) provide a filename in a (text) input or via radiobutton or whatever, and then matching that (possibly garbled) data against what you think you want processed by which script...after which you'll still have to untaint the data in the file before you let it get anywhere near the system.

Update ...to say that I will try to make last para easier to read as soon as I relocate/reconnect language centers in brain. Sorry. That's almost as hard to grok as OP's statement of problem