I am trying to receive and delete multiple FTP files from a remote FTP server using Script task Below is the code
Dim FTPConnMgr As ConnectionManager
FTPConnMgr = Dts.Connections("FTP Connection Manager")
Dim FTPClientConn As FtpClientConnection = New FtpClientConnection(FTPConnMgr.AcquireConnection(Nothing))
Dim FileTimeStampNew As String = "20100913021807"
Dim remoteFileNames(0) As String
remoteFileNames(0) = Dts.Variables("FtpRemoteDirectory").Value & "*" & FileTimeStampNew & ".*"
'Below hardcoded FileName works good. But the problem is there are lots of file in the FTP folder that I dont want to receive
'remoteFileNames(0) = Dts.Variables("FtpRemoteDirectory").Value & "Company_alpha_Full_20100913021807.xml"
Dim localPath As String = Dts.Variables("FtpLocalDirectory").Value
FTPClientConn.ReceiveFiles(remoteFileNames, localPath, False, False)
Dts.TaskResult = ScriptResults.Success
If i specifically mention the RemotefileNames this works fine but, when I say *.* it executes succefully but doesn't receives the file.
Please advice how to receive multiple file based on a variable
View Complete Post