Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do i count number of zip files present on FTP Folder using SSIS. Guide me to find the number of files present.

What I have tried:

I had tried with C# code.
But its not working
Posted
Updated 3-Jan-17 22:53pm
v2

1 solution

There are no FTP commands for listing only specific files using a mask.

So you have to retrieve all files from a directory (e.g. using the FTP LIST command), filter the response (remove all lines that does not contain ".zip"), and count the number of remaining lines.

With WinSCP you can use the scripting mode (or pass FTP commands on the command line) and write the output to a log file (see Command-line Options :: WinSCP[^] ). Then process that log file to get the required information.

[EDIT]
The above block about WinSCP has been written because the initial subject was "Count number of files exist on FTP accessed using WINSCP". But the OP has altered the subject.
[/EDIT]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900