Topic "[newbie] "Nothing to synchronize"?"

Author Message
Winfried
[View user's profile]

Joined: 2011-01-07
Posts: 5
Hello

I just downloaded WinSCP 4.2.9 and tried to write my first script to synchronize a remote FTP server with a local XP host, before syncing this XP host with a second, remote FTP server.

Using the console, I can successfully log on, but "synchronize local c:\remote.ftp /files" does nothing and just displays "Nothing to synchronize."

Just in case, I...
1. Checked that there is a "/files" directory on the FTP server, and it's full of files
2. On the local host, I created a c:\remote.ftp, in case WinSCP couldn't create the directory itself.

Here's my script:
Code:

option batch on
option confirm off

open ftp://me:pass@ftp.acme.com
option transfer binary
#remote server is reference
synchronize local c:\remote.ftp /files
close

exit


Am I missing something obvious?

Any help appreciated, thank you.
Advertisements
Winfried
[View user's profile]

Joined: 2011-01-07
Posts: 5
Found what it was: The remote FTP server is in a co-lo and requires cd'ing to the directory before attempting to download files:

Code:

open ftp://me:pass@ftp.acme.com
option transfer binary
cd files
synchronize local c:\remote.ftp .
close


HTH,
Winfried
[View user's profile]

Joined: 2011-01-07
Posts: 5
I notice, however, that 4 files are being uploaded from the local host to the second, remote FTP server every time I run the script.

I looks like it could be due to case (upper- or lower-case), since Windows doesn't make a difference between MYFILE.EXE and myfile.exe.

Does someone know more about this issue?

Thank you.
archana.b
[View user's profile]

Joined: 2011-01-07
Posts: 4
Location: 109
I am also getting the same problem...
My Script is

open sftp://username:root3123@myserver.com
cd /usr/CSVs
synchronize local "C:\use"
exit

I am getting output as
Local 'C:\use' <= Remote '/usr/CSVs'
Synchronizing...
But after this when i go and check my C:\use i am not finding any new files i means its not getting synchronized Sad .
Please give me reply ASAP Thanks in advance
Winfried
[View user's profile]

Joined: 2011-01-07
Posts: 5
I don't know why WinSCP was re-uploading the exact four files while leaving the other files, but I found a solution: FTP #2 already had some files in there: Simply removing all the files and relaunching the WinSCP script solved the issue. Maybe it'll work for you too.
archana.b
[View user's profile]

Joined: 2011-01-07
Posts: 4
Location: 109
if i delete all the files and if i run the script again also its not working for me..
i am not finding any files in the folder..its being empty..
Winfried
[View user's profile]

Joined: 2011-01-07
Posts: 5
I don't know. You could run the commands manually in the console to see if WinSCP reports errors.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
Both of you, does synchronization works for you correctly in the GUI?
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License