As Sinister states, and as you suspect, this is possible. The -s option of the FTP command allows you to pass a file with a series of commands to the FTP program. The trick however, is that the ftp command file is static and does not have any variable processing in it like a batch file does.
So you'll have to write a batch file which takes the variable(s) and generates the FTP command file at run time based on the supplied value(s), and then calls FTP with the -s option and the generated command file.
Which are the variables? Only the file name on the PUT line, or is the FTP server IP a variable as well?
Your batch ftpfileput.bat can look something like:
Rem Usage: ftpfileput filename
Rem where filename = existing local file to FTP PUT to server x.x.x.x
Rem %1 = supplied filename to FTP PUT
Rem
if not exist %1 goto noFile
Rem
Rem the first echo below uses < redirect to create the command file
Rem subsequent echo uses << redirect to append to the command file
Rem therefore you're building the file line-by-line
Rem
echo open x.x.x.x >ftpcommand.ftp
echo username >>ftpcommand.ftp
echo password >>ftpcommand.ftp
echo ascii >>ftpcommand.ftp
echo cd ai_pos_rcv >>ftpcommand.ftp
echo cd ai_root:[pos_rcv] >>ftpcommand.ftp
echo put %1 >>ftpcommand.ftp
echo bye >>ftpcommand.ftp
Rem ready to run the FTP
ftp -s:ftpcommand.ftp
goto done
:noFile
echo .
echo %1 does not exist!
:done
echo .
echo .
echo Done!
This is rough, but you'll get the idea. I can think of another method using the copy command and the + operator to concatenate different file stubs into a complete command file, but for a command file this short it's just as easy to use the echo and output redirects to build the command file line by line.