Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.6k views
in .NET FTP by (440 points)
I'm using FtpRemoteFileList to display a list of files on the remote server. I'd like to allow my user to click a download button to download a single file or multiple selected files (versus click & drag or double-clicking). Is it possible for me to get the name of the file(s) selected in the FtpRemoteFileList and write it to either a string variable or array? I cannot tell how to do so. Any help will be appreciated.

Thanks!

2 Answers

0 votes
by (51.6k points)
Yes, you can use FtpRemoteFileList.SelectedFileItems to get a list of the currently selected files. You can then call ExFTPConnection.BeginDownloadFile for each file to download them.

Alternatively, there's a method called FtpRemoteFileList.TransferSelectedItems that you could call from the button's click-handler, which will do the same thing.

- Hans (EnterpriseDT)
0 votes
by (440 points)
Excellent! Thank you, Hans. I had been trying to use FtpRemoteFileList.SelectedFileItems, but wasn't sure how I could loop through the list of files. FtpRemoteFileList.TransferSelectedItems looks like an easier method to use.

Categories

...