How to run a python file with Winscp?

Advertisement

Ursula
Guest

How to run a python file with Winscp?

I have a php file that contains a button that works this function:
function Addmain() {
exec (' "C:\Program Files (x86)\WinSCP\WinSCP.exe" /ini=nul /script=C:\Scripts\update.txt');
}

And the Addmain.txt file is :
open sftp://example:mpd@x.x.x.x -hostkey="ssh-ed25519 256 xx.xx.xx.xx.xx.xx.xx.xx.xx.xx.xx.xx.xx.xx.xx.xx"
python 'update_main.py'
close
exit


the problem is it doesn't work from easyphp but if I excel the script with putty it works!!
Help please!

Reply with quote

Advertisement

You can post new topics in this forum