Hi,
I have a script file based automation set up to connect to a Salesforce SFTP and my goal is to download the newest file matching a filemask in a certain folder. The script connects without problems and then tries:
get -latest -filemask=tracking_*.zip /export/* MyLocalDownloadDirectory\
The files are named with the export date, as
tracking_YYYYMMDD.zip
. I thought I had it working, but looking at the logs it seems to be failing sometimes, despite there being a new file matching all criteria.
When it works, the log lists files and then says
'Copying 1 files/directories to local directory...' but when it fails, there is a
'File "/export/blablabla" excluded from transfer' after the list of files, where
blablabla
doesn't match my filemask at all, and then an
'(ESkipFile)' followed by 'Copying finished: Transferred: 0'.
Is this combination of the two switches
-latest
and
-filemask
not possible or am I using the wrong syntax?
I'm running WinSCP 5.13.5 (Build 8967).
Best regards,
David