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 execute the script with PuTTY, it works!!
Help please!

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum