ListDirectory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All
I had used "WebRequestMethods.Ftp.ListDirectory"
but it returns a string contains html format
I thought it returns a string that contains files names
how we can resolve that?
 
Hello All
I had used "WebRequestMethods.Ftp.ListDirectory"
but it returns a string contains html format
I thought it returns a string that contains files names
how we can resolve that?

What the string conteins?
 
The data returned by a FTP server responding to a « LIST » command is not
a standard.. The format of the returned directory list can be customized by
the FTP admin, so there is absolutely no guarantee that the format will
match the one your use in your application.



The solution is to reconfigure the LIST command on your FTP server. If
this is not possible, you have to do the job with the http data returned by
the server. Don't forget that other FTP sever may return a completely
different format...

Steph.

"Just close your eyes and see"
 
this is a sample of what i get
<HEAD>
<TITLE>FTP root at ftp.myServer.com. </TITLE>
</HEAD>
<BODY>
<H1>FTP root at ftp.myServer.com. </H1>
<HR>
<PRE>
05/03/07 09:17PM <DIR> <A HREF="/13558/">13558</A>
 
this is a sample of what i get>HTML>

<HEAD>
<TITLE>FTP root at ftp.myServer.com. </TITLE>
</HEAD>
<BODY>
<H1>FTP root at ftp.myServer.com. </H1>
<HR>
<PRE>
05/03/07 09:17PM <DIR> <A HREF="/13558/">13558</A>

John Timney (MVP) gave you an answer.
Anyway you can retrieve the information from the html response.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top