Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.2k views
in .NET FTP by (1.4k points)
I would like to limit the number of files for remotefilelist as the remote directory has many files and it takes a bit long to display.
I would like to sort by datetime field then display 20 files. This works, except I can't find a way to limit the file list returned to 20 files.
I do all of this asyn....

Is there any way to limit the remotefilelist to a certain number of files returned?

2 Answers

0 votes
by (162k points)
Hmm. Possible, maybe.

You could set TransferNotifyListings = true (to ensure that events are raised during listings) and then use the BytesTransferred event.

After x bytes have been transferred (say roughly enough for 20 lines more or less), in the BytesTransferred event call CancelTransfer() on the FTPConnection object.

That might work ...
0 votes
by (1.4k points)
hmmmm...good thought. I will give that a shot and see how that works. I don't need exact, just to list 20 or so files instead of 10000
thanks

Categories

...