Ftp Download Stops without downloading all the files

Hi all,
I was trying to download some set of files which has a sequential naming pattern as below. I’m giving the start and end number of the files in order to get download all the files between those two numbers. BillStart = 277410, BillEnd = 277412 example files: 277410_1-1-03-1-LKR-101-00-BILL_1.9, 277411_1-1-03-1-LKR-101-00-BILL_1.9, 277412_1-1-03-1-LKR-101-00-BILL_1.9, etc. But download stops in the middle without downloading all the required files. Please support me on this.

The condition I’m using is,

If (not file.FullName.Contains(“control”) and file.FullName.Contains(BillStart.ToString.Trim) And BillStart<=BillEnd)

image

I want to download files starting from 277410 - 277420
but it stops at 277412. I have tried with different ranges too but it stops in a random file.

Try to print the entries in RemotePath variable to see how many members are there.

@Anas_Pv You mean the number of files in RemotePath?

Yes, to check if the RemotePath variable have all the file names in it.

Yeah I tried that. I can go to that remote path manually too, all the files are there.

Any suggestion on this?