Hi
Is there any way to send a StringList through ScSFTPClient and store as a file on the sFtp site? I have to do it that way since I am not allowed to store it in file because of content of the stringlist.
Best regards,
Hjortur.
Iceland.
Put file through ScSFTPClient from Stream.
You can use the following code:
Code: Select all
Handle := ScSFTPClient.OpenFile(Fielname, [foCreate, foRead, foWrite]);
s := StringList.Text;
ScSFTPClient.WriteFile(Handle, 0, s[1], Length(s));
ScSFTPClient.CloseHandle(Handle);