I am using Delphi and I am in the process of trying to use 'rsync' via 'ssh' in order to "download" a few files from a Linux server onto a Windows client.
Via the use of a 'TScFileStorage' and a 'TScSSHClient' components, I am able to establish a connection from my Windows Desktop to my Linux server.
In order to run 'rsync' via 'ssh,' I am using a 'TScSSHShell' component.
Here is my code:
iCommand := 'rsync -vrtzn --delete -e ssh @:/data/ /cygdrive/c/data/';
try
ScSSHClient.Connected := True;
try
ScSSHShell.Connected := True;
iResponse := ScSSHShell.ExecuteCommand(iCommand);
ShowMessage(iResponse);
ScSSHShell.Connected := False;
except
on E: Exception do ShowMessage(E.Message);
end;
ScSSHClient.Connected := False;
except
on E: Exception do ShowMessage(E.Message);
end;
If I set the 'NonBlocking' property of my 'TScSSHShell' component to 'False,' I get a blank response.
If I set the 'NonBlocking' property of my 'TScSSHShell' component to 'True,' I do not get response. The program seems to hang.
Does anybody know what I might be doing wrong?[/code]
RSync?
-
- Posts: 4
- Joined: Thu 22 Mar 2012 22:52