Automate download files from SFTP site

29 Views Asked by At

I have a SFTP site which has new folder created daily containing previous day's business data in various files. I need to download the files required automatically. I created a .bat file as below -

sftp user:[email protected] -hostkey="ssh-ed25519 255 QFOKzoGePLP9Rnez8pD27SU4PRUKv9mjp858x861vzE" -rawsettings FSProtocol=2

echo Connected !

get "/backup/20240228/cs2-20240228-0115-0000-2010*.zip" "C:\ETL\20240228"

echo Download Completed!

I then created a SSIS Execute Process Task to call this .bat. Everything works fine. BUT I am struggling to pass variable into this process, e.g. change 20240228 to today()-1?

Many thanks

Some guidance around this project

0

There are 0 best solutions below