View Single Post
Join Date: Mar 2008
Posts: 136
Reputation: cVz is an unknown quantity at this point 
Solved Threads: 7
cVz's Avatar
cVz cVz is offline Offline
Junior Poster

Server Files in Combobox ??

 
0
  #1
Jan 8th, 2009
Hello fellow super coder people

i am rtying to list all the files in a certain directory (eg. "TestDir") in a combobox

  1. try
  2. {
  3. m_ftp.Server = txtftpServerName.Text;
  4. m_ftp.Username = txtftpUserName.Text;
  5. m_ftp.Password = txtftpPassword.Text;
  6.  
  7. m_ftp.Login();
  8. string[] The_File = m_ftp.GetFileList("TestDir");
  9.  
  10. foreach (string FILE in The_File)
  11. {
  12. cboFindFile.Items.Add(FILE);
  13. Console.Write(FILE);
  14. }
  15. m_ftp.Close();
  16. }
  17. catch(Exception EX)
  18. {
  19. MessageBox.Show("Files Not Downloaded");
  20. }

That only downloads one file into the combobox ...

Any ideas ???
please help...

Regards and thanks...
Last edited by cVz; Jan 8th, 2009 at 6:11 am.
Delphi & C# programmer deluxe...
Reply With Quote