-1

Is there a way to access an SFTP directory using BIDS? I need to check if a file exists in it. I have read everywhere and can't find anything that would solve my issue.

This is for a package that uploads files using a batch file and checks which files were uploaded. Is there a way to get the filenames or any file attribute in the directory?

Thank you very much. Good day.

user1993177
  • 573
  • 2
  • 6
  • 9

2 Answers2

0

You can't access SFTP directly from BIDS. You can

1) Buy a commercial add in like http://www.cozyroc.com/ssis/sftp-task

2) Try the codeplex one if you've got VS2010 http://ssissftp.codeplex.com

3) Use WinSCP

I've used WinSCP very effectively and consequently it's the one I would recommend using.

Ciarán
  • 3,017
  • 1
  • 16
  • 20
0

i have a similar problem solved by using "Execute Process Task" to run pscp.exe The argument tells pscp to make a list on the given directory and write the result to a flat file - the argument looks like this:

" -ls -P 22 -unsafe -i "Z:\DirToKey\Key.private" user@target:/TargetDIR > Z:\LSTempDir\list.txt

with the content of the list.txt, you can do all the black magic with the information... script task, insert into database.. as you wish. i my case i pull it in a database to check the file names and file attributes to detect changes

Joe Platano
  • 586
  • 1
  • 14
  • 27