"C:\WinSCP.com" /script=script.txt /log=log.txt
the script file contains
option batch continue open ftp://images%40site.org.nz:firstname.lastname@example.org/ mkdir temp cd temp put "image.png" cd rmdir live mv temp live
this works fine if I doubleclick the batch file, alternately this works as well (whether using a windows shortcut or a batch file)
"C:\WinSCP.exe" /console /script=script.txt /log=log.txt
It's not a typo in my file path, as I can also get access and task scheduler to execute winscp either directly, or by running the above batch file IF I remove "/script=script.txt" from the command line, but the instant I put "/script=script.txt" back in it stops working. no error, no entry in the log file. just a quick flash of black as the command prompt window appears for a fraction of a second
this behaviour exhibits itself regardless of the contents or name of the script file. I've tried two different ftp servers and even empty script files. the behaviour is the same, fine when executed manually, and failure if executed via code or scheduler. in all cases of failure when run via vba or scheduler, I can get winscp to run by leaving everything the same and removing "/script=script.txt"