You're post is a little confusing, but the following hacked-together piece of code should do roughly what you want. I've left off the actual upload command since I'm not sure that I understand the syntax you specified.
echo Enter a directory:
echo Enter a pattern:
for file in `ls $directory/$pattern`
# actual command is left as an exercise to the reader...