Click here to Skip to main content
11,920,156 members (57,624 online)
Rate this:
Please Sign up or sign in to vote.
See more: FTP Client

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 5:05am
Edited 28-May-12 5: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
0 OriginalGriff 455
1 phil.o 170
2 CPallini 150
4 F-ES Sitecore 130
0 OriginalGriff 6,778
1 KrunalRohit 4,495
2 Sergey Alexandrovich Kryukov 3,153
3 George Jonsson 2,810
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web01 | 2.8.151120.1 | Last Updated 28 May 2012
Copyright © CodeProject, 1999-2015
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