Please read
https://winscp.net/eng/docs/logging_xml
Or wait for the next version, it will be way easier with it.
https://winscp.net/eng/docs/logging_xml
Or wait for the next version, it will be way easier with it.
ShellExecute_AndWait
, which can be found at Torry or here:
procedure TForm1.Button1Click(Sender: TObject);
var logdir, progdir, paramstring: string;
begin
logdir := 'C:\Users\user\Documents';
progdir := 'C:\Program Files (x86)\WinSCP\WinSCP.exe'; //for use with Win7/x64
paramstring := '/ini=WinSCP.ini /log=logfile.txt /script=C:\Users\user\Documents\upload2.txt';
if ShellExecute_AndWait('open', PChar(progdir), paramstring, logdir, SW_SHOWNORMAL, true) >=0 then
begin
Sleep(1000);
Memo1.Lines.LoadFromFile(logdir + '\logfile.txt');
end
else
ShowMessage('Error 1');
end;
option batch abort
option confirm off
open username@hostname.com
put D:\heuteneu.txt /httpdocs/content/test/heuteneu.txt
exit
CreateProcess()
for create a process with WinSCP.com
.
open
, put
, close
...
WriteLine()
in example C# and VB.NET in documentation)