Scripting in SSIS
I am writing a task in SSIS to use WinSCP to grab some files from an SFTP site.
Works great, downloads all of the files into the e:\SSISImports directory and moves the files on the remote side to a directory called backup. I'd like to do a few other things, but I'm unsure how.
1) Possibly modify my script to look for the file with the timestamp of yesterday. The client I'm working with created a file called download033009.txt with the latter numbers changing based on the day it was created. Since my job runs at 3am, I'd like to look for yesterdays file and if it isn't there, alert someone using SSIS task.
2) If the file I am trying to download has a timestamp that is later than the one I have locally, is there anyway to overwrite the local file?
thanks!
M@
cd Scorecard option transfer binary get *.* e:\SSISImports\ mv *.txt backup/* close exit
Works great, downloads all of the files into the e:\SSISImports directory and moves the files on the remote side to a directory called backup. I'd like to do a few other things, but I'm unsure how.
1) Possibly modify my script to look for the file with the timestamp of yesterday. The client I'm working with created a file called download033009.txt with the latter numbers changing based on the day it was created. Since my job runs at 3am, I'd like to look for yesterdays file and if it isn't there, alert someone using SSIS task.
2) If the file I am trying to download has a timestamp that is later than the one I have locally, is there anyway to overwrite the local file?
thanks!
M@