Please, I need help loading only current day files from local directory to SFTP server. Apparently, FTP Task in SSIS cannot move to SFTP, only FTP.
Moreover, I have FileZilla. Can I use FileZilla in SSIS? or can I make FileZilla automatically to send the files at a specific time? (using Windows 10)
You cannot use FileZilla. FileZilla does not support any kind of scripting.
There are many other scriptable SFTP clients.
Your task is easy with WinSCP, as it has a syntax to select the today's files.
You can use a batch file like:
winscp.com /ini=nul /command ^
"open sftp://username:password;fingerprint=hostkeyfingerprint@example.com/" ^
"put -filemask=*>=today ""c:\local\path\*"" ""/remote/path/""" ^
"exit"
The >=today
keyword is supported by WinSCP 5.15 and newer only.
In older versions, you can use %TIMESTAMP%
syntax, particularly >=%%TIMESTAMP#yyyy-mm-dd%%
, instead of >=today
.
You can have WinSCP GUI generate the batch file template for you, including the host key fingerprint part.
References:
You can use the script in SSIS or schedule it with Windows scheduler.
(I'm the author of WinSCP)