Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Ursula

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!