How do I count number of zip files present in an FTP folder in SSIS?
Guide me to find the number of files present.
With the WinSCP .NET assembly, just use the Session.EnumerateRemoteFiles method and call the Count extension method on the result:
Session.EnumerateRemoteFiles
Count
var path = "/remote/path"; var files = session.EnumerateRemoteFiles(path, "*.zip", EnumerationOptions.None); int count = files.Count();
See also Using WinSCP .NET Assembly from SQL Server Integration Services (SSIS).
With the WinSCP .NET assembly, just use the
Session.EnumerateRemoteFilesmethod and call theCountextension method on the result:See also Using WinSCP .NET Assembly from SQL Server Integration Services (SSIS).