Posted: 2015-11-24 14:29
I'm trying to automate a process of getting and deleting files from the SFTP server. My issue is that when it gets to the first "get" statement that doesn't have files in the directory, it fails the entire process.
I tried with this line both in the script and not in the script since that is supposed to be the default: option failonnomatch off
I need the script to pull anything in the folder, if nothing move to the next get statement and not fail.
# Automatically abort script on errors
#option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
option failonnomatch off
#Connect to SFTP Server
#Get and delete the customer data files ready for processing on ELT server.
#get -delete /test/upload/currencymaster/*.* E:\ABC\123\INCOMING_FILES\CURRENCYMASTER\
#get -delete /test/upload/customermaster/* get -delete /test/upload/ E:\ABC\123\INCOMING_FILES\CUSTOMERMASTER\
get -delete /test/upload/empmaster/*.* E:\ABC\123\INCOMING_FILES\EMPMASTER\
#get -delete /test/upload/registermaster/* E:\ABC\123\INCOMING_FILES\REGISTERMASTER\
get -delete /test/upload/skumaster/*.* E:\ABC\123\INCOMING_FILES\SKUMASTER\
#get -delete /test/upload/staging/*.* E:\ABC\123\INCOMING_FILES\STAGING\
get -delete /test/upload/storemaster/*.* E:\ABC\123\INCOMING_FILES\STOREMASTER\
#get -delete /test/upload/suppmaster/*.* E:\ABC\123\INCOMING_FILES\SUPPMASTER\
get -delete /test/upload/tloga_1/*.* E:\ABC\123\INCOMING_FILES\TLOGA_1\
#get -delete /test/upload/tlogb_1/* E:\ABC\123\INCOMING_FILES\TLOGB_1\
#Disconnect from SFTP server
#Exit the Winscp application
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).
To generate log file, use
You can post new topics in this forum
And it's free!