I use a batch file to call winscp.
What I'm trying to do is send a parameter from the bat file to winscp and check that the file has been correctly uploaded.
So here's what my bat file looks like,beside the point is that the bat file is called from SQL server.
winscp.com /console /script=Web_Test1.txt /parameter %1% /log=c:\WinScp.log
IF %ERRORLEVEL% neq 0 goto error
ECHO Success> c:\sucess_%1%.txt
EXIT /b 0
ECHO Error> c:\error_%1%.txt
EXIT /b 1
This is how the scipt file looks like Web_Test1.txt
option batch abortion
option confirm off
open ftp: // username: firstname.lastname@example.org
option transfer binary
#Would above be all that is needed or should I add below:
IF% ERRORLEVEL% neq 0 goto error
ECHO Error> c: \ error_% 1% .txt