| | |
FTP error
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
Hello all you VB.NET 'ers
This being my first post would first of all like to say "Hallo!" :cheesy:
My problem is with Microsoft's FTP class
http://support.microsoft.com/default...b;en-us;832679
When I use this class, I am calling the
GetFileList Function to populate a listbox so that the user may be able to choose the files to download. However, it does not consistently return all the files. Usually it either 1] return only 1 file in the directory (if lots of files are in directory only returns one) 2] return all files in directory.
Has anyone had the same problem before and know how to fix this or have another FTP class that I could use to achieve this?
Thanks in advance.This should help greatly in several of the programs I need to run that need to retrieve a file from an FTP site to process and such.
This being my first post would first of all like to say "Hallo!" :cheesy:
My problem is with Microsoft's FTP class
http://support.microsoft.com/default...b;en-us;832679
When I use this class, I am calling the
GetFileList Function to populate a listbox so that the user may be able to choose the files to download. However, it does not consistently return all the files. Usually it either 1] return only 1 file in the directory (if lots of files are in directory only returns one) 2] return all files in directory.
Has anyone had the same problem before and know how to fix this or have another FTP class that I could use to achieve this?
Thanks in advance.This should help greatly in several of the programs I need to run that need to retrieve a file from an FTP site to process and such.
Actually I "solved" it.
In the GetFileList Function is the following code
I replaces it with the following which seems to work 100% now.
This snipped of code which I edited can be obtained from
http://www.mentalis.org/classlib/class.php?id=23
:-)
In the GetFileList Function is the following code
VB.NET Syntax (Toggle Plain Text)
Do While (True) m_aBuffer.Clear(m_aBuffer, 0, m_aBuffer.Length) bytes = cSocket.Receive(m_aBuffer, m_aBuffer.Length, 0) m_sMes += ASCII.GetString(m_aBuffer, 0, bytes) If (bytes < m_aBuffer.Length) Then Exit Do End If Loop
VB.NET Syntax (Toggle Plain Text)
Do m_aBuffer.Clear(m_aBuffer, 0, m_aBuffer.Length) bytes = cSocket.Receive(m_aBuffer) If bytes > 0 Then m_sMes += ASCII.GetString(m_aBuffer, 0, bytes) End If Loop Until bytes = 0
http://www.mentalis.org/classlib/class.php?id=23
:-)
![]() |
Similar Threads
- FTP error in Dreamweaver (Site Layout and Usability)
- Problem with Dreamweavers FTP (Site Layout and Usability)
- URGENT: FTP Client / Server using RMI (Java)
- FTP Error in Dreamweaver MX (Networking Hardware Configuration)
- Connection Closed. Timeout (20s) FTP Error (Networking Hardware Configuration)
- FTP Error 550..no go for deletes or anything! (Windows Software)
Other Threads in the VB.NET Forum
- Previous Thread: closing form1 from form2
- Next Thread: ComboBox UpDate Problem
| Thread Tools | Search this Thread |
.net .net2005 .net2008 30minutes 2005 2008 access account arithmetic array basic browser button buttons center check code component connectionstring crystalreport cuesent data database databasesearch datagrid datagridview date datetimepicker design dissertation dissertations dissertationthesis dissertationtopic dropdownlist excel fade file-dialog filter folder ftp generatetags hardcopy image images input insert intel monitor navigate net networking opacity output panel passingparameters peertopeervideostreaming picturebox picturebox1 port printing problem problemwithinstallation project reports" savedialog searchvb.net select settings shutdown string survey tcp temperature text textbox timer timespan toolbox transparency trim updown user usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year





