all groups > dotnet academic > april 2004 >
You're in the

dotnet academic

group:

NLST


NLST Oren
4/25/2004 1:06:01 AM
dotnet academic:
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 tha
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

Re: NLST Gerry O'Brien [MVP]
4/25/2004 1:32:37 PM
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


[quoted text, click to view]

Re: NLST Peter van der Goes
4/25/2004 6:41:26 PM

[quoted text, click to view]
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.

Re: NLST Gerry O'Brien [MVP]
4/25/2004 8:52:37 PM
Ahhh. I thought about reading the RFC but instead went to the command line
FTP client in Windows. It doesn't support NLST.

At any rate, you are correct. If a directory is blank, it appears as if
nothing is returned.

To the OP, why not simply use ls or dir? I have not programmed for FTP so
again, excuse my ignorance on this.



--
Gerry O'Brien
Visual Developer .NET MVP
Visual Basic


[quoted text, click to view]

AddThis Social Bookmark Button