Auto Sync FTP

Advertisement

Becares
Joined:
Posts:
2
Location:
Madrid

Auto Sync FTP

Hi guys,

I´m trying to synchronize automatically a remote directory in the FTP with files downloaded to my local directory. But it does not work.

This is the script that I have created:
# Connect to FTP server using a password
open ftp://device_aceptance:password@ftp.com/ -hostkey="ssh-dss 1024 78:64:1a:5c:27:7a:5e:46:1f:c7:c2:37:48:b8:df:3f:f9:8f:a3:ca"
# Upload file
keepuptodate C:\Users\cmb\Downloads\SW DL /SW Homologaciones
# Exit WinSCP
exit
Then I go to the task scheduler:
1. I created a new task
2. Put "C:\Program Files (x86)\WinSCP\WinSCP.exe" in action field
3. Put /script="C:\Program Files (x86)\WinSCP\SCript_auto_FTP.txt" in Add arguments

But is does not work
Any idea about that?

Thanks in advance
regards

carlos.

Reply with quote

Advertisement

Becares
Joined:
Posts:
2
Location:
Madrid

Re: Auto Sync FTP

Thank you for your reply.
I have tried that, but it still not working, even log events are not shown.

My script is located in C:\Program Files (x86)\WinSCP with name SCript_auto_FTP.txt. I have checked that the same route is put on the task scheduler.
When I launch manually in cmd line:
C:\Program Files (x86)\WinSCP>WinSCP.exe /script="c:\Program Files (x86)\WinSCP\SCript_auto_FTP.txt" /log="c:\Program Files (x86)\WinSCP\Script_auto_FTP.log"
I have not response:
C:\Program Files (x86)\WinSCP>

Reply with quote

CarlosMB
Guest

Sync FTP with local folder

Hi all,

I have done this script to sync the local folder with a FTP
# Connect to FTP server using a password
option batch abort
option confirm off
open ftp://user:pass@ftp.wireless.dekra-product-safety.com/ -hostkey="ssh-dss 1024 78:64:1a:5c:27:7a:5e:46:1f:c7:c2:37:48:b8:df:3f:f9:8f:a3:ca"
# Upload file
synchronize remote C:\Users\cmb\Downloads\SW DL /SW Homologaciones
# Exit WinSCP
exit
Also I created the file.bat:
winscp.com /script=SCript_auto_FTP_version1.txt
pause
But after executing the .bat:
C:\Program Files (x86)\WinSCP>winscp.com /script=SCript_auto_FTP_version1.txt
batch           abort
confirm         off
Conectando con ftp.wireless.dekra-product-safety.com...
Error de conexión.
Desconectado del servidor
Error de conexión.
Sorry, cleartext sessions and weak ciphers are not accepted on this server.
Please reconnect using TLS security mechanisms.

C:\Program Files (x86)\WinSCP>pause
Presione una tecla para continuar . . .
Any idea to solve this problem?
Thanks in advance
regards

carlos.

Reply with quote

Advertisement

CarlosMB
Guest

Re: Sync FTP with local folder

I have modified the script to this:
# Connect to FTP server using a password
option batch abort
option confirm off
open -explicittls ftps://device_aceptance:a6g88GX3@ftp.wireless.dekra-product-safety.com/
# Upload file
synchronize remote c:\Users\cmb\Downloads\SWprueba /SW Homologaciones
# Exit WinSCP
exit
and now this is the response:
C:\Program Files (x86)\WinSCP>winscp.com /script=SCript_auto_FTP_version1.txt
batch           abort
confirm         off
Conectando con ftp.wireless.dekra-product-safety.com...
Conexión TLS establecida, esperando bienvenida...
Conectado
Iniciando la sesión...
Sesión iniciada.
Sesión activa: [1] device_aceptance@ftp.wireless.dekra-product-safety.com
Demasiados parámetros para el comando «synchronize».

C:\Program Files (x86)\WinSCP>pause
Presione una tecla para continuar . . .
Many parameters for synchroniza?

Reply with quote

Advertisement

You can post new topics in this forum