Ftp using rsync

rsync

I use Windows 7 machine and Putty to connect to UNIX servers. I am required to FTP certain files from those server to my local windows machine. For this purpose I use a FTP client like FileZilla or WinSCP.

However, I want to create a script , that would:

  1. Connect to unix server from my windows machine.
  2. FTP file from certain directories to windows machine.
  3. Terminate the connection after the FTP download is complete.
  4. This should occur periodically.

I have installed rsync 3.0 and cygwin. When I enter the following command:

rsync -e ssh user@host:/remote_directory .

It asks me: Enter Securid PASSCODE:.
and I enter the password for the same, but I get the error:

sh: rsync:  not found.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: remote command not found (code 127)
   at /home/lapo/package/rsync-3.0.9-1/src/rsync-3.0.9/io.c(605) [Receiver=3.0.9]

Please help me in understanding why I face this problem.

Best Answer

Use cURL instead. rsync won't do what you require.