Topic "Problem synchronize local"

Author Message
MICHAEL HUGE (abildoc)

Guest


Hi,

I want to protect my FTP file transfer.
Randomly, I sometimes have a synchronization that does not happen.
I have many files in my remote folder. the command "synchonize local" returns "nothing to synchronize."
my files are not tranfered and as I delete all at the end then I lose my files.

this is my winscp script :

option echo off
option batch on
option confirm off
open ftp://***:***@****.abildoc.com
synchronize local C:\app-capture4invoice\FTP\WORK_TEMP\OUT\outbox-france\ /OUT/outbox-france
rm /OUT/outbox-france/*.*
close
exit

My result with problem :

echo off
batch on
reconnecttime 120
confirm off
Connecting to ****.abildoc.com ...
Connected
Starting the session...
Session started.
Active session: [1] ****@****.abildoc.com
Comparing...
Local 'C:\app-capture4invoice\FTP\WORK_TEMP\OUT\outbox-france-rd' <= Remote '/OUT/outbox-france-rd'
Nothing to synchronize.
/OUT/outbox-france-rd/invoice-70636##$##_2016_10_24_14_23_584_45996622645.pdf
/OUT/outbox-france-rd/invoice-70636##$##_2016_10_24_14_23_584_45996622645.xml
/OUT/outbox-france-rd/invoice-70636##$##_2016_10_24_14_23_584_45996622646.pdf
/OUT/outbox-france-rd/invoice-70636##$##_2016_10_24_14_23_584_45996622646.xml
/OUT/outbox-france-rd/invoice-70636##$##_2016_10_24_14_23_584_45996622647.pdf
/OUT/outbox-france-rd/invoice-70636##$##_2016_10_24_14_23_584_45996622647.xml
Session '*****@*****.abildoc.com' closed.
No session.

How to verify my FTP transfert is OK before delete files ?

Thanks you for your help.

Best regards,

MICHAEL
Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
Well, first your script is not safe. You remove the files after synchronization. What guarantees you that some files are not created between the synchronize and the rm?

See https://winscp.net/eng/docs/library_example_delete_after_successful_download

If you are sure, there's something wrong anyway, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
MICHAEL HUGE (abildoc)

Guest


Hi,

thanks you for your fast answer.

But I don't a developper. I don't know .NET code.
I use only command line.

have you an example script (secure ftp transfert and delete files after success) with command line ?

Best regards,

MICHAEL
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
Sorry, but your scenario is so specific, that you cannot expect that a simple command-line interface supports it.
Guest




Hi,

Thanks you.
Advertisements

You can post new topics in this forum

Search

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