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,
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,