Passing parameters to a ftp script

I have a script which ftps to a server and gets a file over which needs to
be passed as a parameter to it.
The script is called test.scr and has the following data where %1 should be
the file name passed to it:
cd /ata
cd BIT
cd storage_device
get %1

It is invoked in the foll way:
system("cmd /E:ON /C ftp -s:C:\\history_log\\storage\\test.scr filename");
where filename-> is a string variable.

When i run this, the parameter is never passed to the script and it always
looks for a f ile named "%1"

How can I get the script file to recognize the parameter?

All help is highly appreciated!