Topic "SFTP Sync Inbound - not bringing data over instead creating 0kb files"

Author Message
amoha

Guest


Hi,
I am working on SFTP scripts that is supposed to sync files for both inbound and outbound. The inbound sync runs to success. But it fails to sync all files properly. It does not miss the file entirely, but instead creates an empty file of the original file. There is no data in these files on the local machine after the sync from the server. The same files on the server are not empty.

Example after sync is completed:
Server File Server - File Size - Local Machine File - Local Machine File Size
1. File A - 34kb - File A - 0kb
2. File B - 64kb - File B - 0kb
3. File C - 26kb - File C - 26kb

Commands used:

# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open XXX@YYYZZZ.EXAMPLE.COM
############Sync Outbound Folder##############
echo ****************************************
echo *******Syncing Outbound Folder Now********
echo ****************************************
#Change local directory
lcd \
#Change local directory
lcd C:\FTP\Out
#Change remote directory
cd ..
#Change remote directory
cd ..
#Change remote directory
cd XXX999/outbound
#Print remote directory
pwd
#Preview Synchronize CURRENT local direcotry to remote directory
synchronize remote -preview
#Print remote directory
pwd
#Synchronize local folder C:\FTP\Out to remote directory
synchronize remote C:\FTP\Out
#Print message
echo TRANSFER COMPLETE!
#Change remote directory
cd ..
#Change remote directory
cd ..
############Sync Inbound folder################
echo ***************************************
echo *******Syncing Inbound Folder Now********
echo ***************************************
#Change local directory
lcd \
#Change local directory
lcd C:\FTP\In
#Change remote directory
cd ..
#Change remote directory
cd ..
#Change remote directory
cd XXX888/inbound
#Print remote directory
pwd
#Preview Synchronize CURRENT remote direcotry to local directory
synchronize local -preview
#Print remote directory
pwd
#Synchronize remote folder to local directory C:\FTP\In
synchronize local C:\FTP\In /XXX888/inbound
#Print message
echo TRANSFER COMPLETE!
#Change remote directory
cd ..
#Change remote directory
cd ..
#Disconnect and Exit WinSCP
exit

I cannot afford to miss out these files...

Please review and help. Thank you,
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate 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.
amoha

Guest


Thank you for getting back to me. Please see the attached log file. I noticed this happens through the GUI as well when using the explorer. I added some speed restrictions and tried other criteria restrictions to see if it helped. None of the steps seem to help so far.
2015-10-02_0829_ftpscript.log (59.67 KB) Private file

Description: Log File

amoha

Guest


Any updates on this? Please help.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Thanks for the log. But I need to know what file you have problem with specifically.
amoha

Guest


prikryl wrote:
Thanks for the log. But I need to know what file you have problem with specifically.


It varies per log. It could be any file at any given time. It just varies and seems to have a mind of it's own...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Sure. But I need to know what particular file had the problem for that specific run (as recorded in the log).
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