Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Scripting in SSIS

ravensensei wrote:

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.

See some examples of similar scripts.

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?

It should be done automatically. Of course you should disable overwrite confirmations. See documentation. Or maybe you are looking for "synchronize local".
ravensensei

Scripting in SSIS

I am writing a task in SSIS to use WinSCP to grab some files from an SFTP site.
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@