SSIS allows you to pass the variable to WinSCP command-line by using an expression in the Arguments property.
You can use
/parameterswitch to pass that further to the script, like:
"/script=c:\path\to\script.txt /parameter " + @Variable
Then in the script, use
%1%to use that parameter: