Put this function into User.js of your test and call according to the Example.
function FtpPut (server,login,password,directory,file_to_upload)
{
var result=false
var filename = Global.GetFullPath("%WORKDIR%\..\\")+"\\"+Tester.GetTestName()+"\\script_ftp.txt"
var cmd=Global.GetFullPath("c:\\Program Files (x86)\\WinSCP\\WinSCP.com") + " /ini=nul /log="+Global.GetFullPath("%WORKDIR%\..\\")+"\\"+Tester.GetTestName()+"\\ftp.log /script="+filename
File.Write(filename, "open ftp://"+login+":"+password+"@"+server+"/ \n")
File.Append(filename, "put "+file_to_upload+" "+directory+ "/ \n")
File.Append(filename, "exit")
Global.DoCmd(cmd)
if (Text.FileContains(Global.GetFullPath("%WORKDIR%\..\\")+"\\"+Tester.GetTestName()+"\\ftp.log", "Exit code: 0")) {
result=true
}
return result
}