You can perform both tasks (loading and executing a command) using WinSCP. Use a WinSCP script like:
option batch abort option confirm off open your_session put %1% call script.sh exit
Link for the call command:
https://winscp.net/eng/docs/scriptcommand_call
Link for syntax %1% :
https://winscp.net/eng/docs/scripting#syntax
Then you can run the script like:
winscp.exe /console /script=script_path\upload.txt /parameter file_to_upload.dat
In fact, you can put a shortcut in the above command in the Windows Explorer Explorer menu, then right-click on any file and go to "Send"> "Download" using WinSCP and execute the remote command (= name of the shortcut).
To do this, go to the %USERPROFILE%\SendTo folder and create a shortcut for the following purpose:
winscp_path\winscp.exe /console /script=script_path\upload.txt /parameter %1
See Create an entry in the Submit menu in Explorer .
Martin Prikryl May 15, '13 at 10:48 2013-05-15 10:48
source share