Click here to Skip to main content
13,197,271 members (59,245 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I am looking at your FTP Client code and I am getting a few issues. When I try to list the file(s) of a ftp server.
For Each file As FTPfileInfo In ftp2.ListDirectoryDetail(sRemoteDir).GetFiles()
Next file

I get a string returned with the following:
(from in ListDirectoryDetail.... Dim str As String = GetStringResponse(ftp))
<HTML> <HEAD> <TITLE>Directory listing for /out/</TITLE> </HEAD> <BODY> <h2>Current directory is /out/</h2> <br> <hr> <DD><IMG SRC=""> <A HREF="ftp://xxxxx:xxxxx111!@">..</A></DD> <DD><IMG SRC=""> <A HREF="ftp://xxxxx:xxxxx111!@">dotnet error.txt</A></DD> <DD><IMG SRC=""> <A HREF="ftp://xxxxx:xxxxx123!@">export.txt</A></DD> <hr> </BODY> </HTML>

The problem appears to be that the _ParseFormats does not cater for the above format in it's expressions. Can you shed some light on this for me? I've changed the ip's etc for security reasons.

Posted 28-May-12 4:05am
Updated 28-May-12 4:15am
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

FTP has nothing to do with file types, not counting the difference between "text" and "binary" mode which is pretty much obsolete; so for almost all practical purpose "binary" should be used. This way, you can get/put files as is.

Acting as a FTP client .NET is way too simple. All you need is using the class System.Net.FtpWebRequest and related classes. Please see the description and the code sample:[^].

losmac 28-May-12 18:07pm
Good answer, my 5!
SAKryukov 28-May-12 19:10pm
Thank you, Maciej.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Post your question to the FTP client article author for a better response, this forum is for general questions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171020.1 | Last Updated 28 May 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100