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

Advertisement

amoha
Guest

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

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,

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: SFTP Sync Inbound - not bringing data over instead creating 0kb files

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.

Reply with quote

amoha
Guest

Log Gile

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

Reply with quote

Advertisement

amoha
Guest

Re: Log Gile

martin 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...

Reply with quote

martin
Site Admin
martin avatar

Re: Log Gile

Sure. But I need to know what particular file had the problem for that specific run (as recorded in the log).

Reply with quote

Advertisement

You can post new topics in this forum