[quoted text, click to view] " Gerry O'Brien [MVP]" <gkcomput@hotmail.com> wrote in message
news:uiz92KuKEHA.1132@TK2MSFTNGP12.phx.gbl...
> I must confess my naivete. Sorry about no accent on the e.
>
> I am no familiar with NLST for an FTP command. What is it used for?
>
> --
> Gerry O'Brien
> Visual Developer .NET MVP
> Visual Basic
>
>
> "Oren" <anonymous@discussions.microsoft.com> wrote in message
> news:557B4778-7D4C-49AE-BDE9-2EB2EF240010@microsoft.com...
> > Hi all,
> >
> > I have already asked this question but I'll phrase it different:
> >
> > I'm using ftp with the command "NLST *.*\r\n". After I send this command
I
> get a reply:
> > "226 Transfer complete". I just want to get the file list, the weird
thing
> is that
> > Sometimes the command works and sometimes doesn't. Logical it doesn't
make
> sense.
> >
> > The commands: USER, PASS, CWD and PASV work FINE before "NLST" command.
> >
> > Any idea why?
> >
> > thanx
>
>
FYI,
Here is what RFC959 (the FTP standard) says:
NAME LIST (NLST)
This command causes a directory listing to be sent from
server to user site. The pathname should specify a
directory or other system-specific file group descriptor; a
null argument implies the current directory. The server
will return a stream of names of files and no other
information. The data will be transferred in ASCII or
EBCDIC type over the data connection as valid pathname
strings separated by <CRLF> or <NL>. (Again the user must
ensure that the TYPE is correct.) This command is intended
to return information that can be used by a program to
further process the files automatically. For example, in
the implementation of a "multiple get" function.
That said, the OP need to supply details. His vague "it works sometimes"
without examples leaves me wondering if he sometimes issues NLIST commands
with invalid pathname arguments.
The original post indicated that the result is a 226 Transfer Complete which
is not an error message. It's simply confirming that the list requested has
been transferred (even if null).
Lets hope the OP replies with more information this time.
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.