1

I want to list the files in FT Pserver.

I use ListDirectory and ListDirectoryDetails FTP methods for listing the files.

That get the files list, but the count of files in ListDirectory is less than ListDirectoryDetails method, but I don't know why?

Is it possible???

Martin Prikryl
  • 167,268
  • 50
  • 405
  • 846
user2352554
  • 511
  • 3
  • 17

1 Answers1

1

The ListDirectory method uses FTP NLST command.

The ListDirectoryDetails method uses FTP LIST command.

It's up to the FTP server, what it returns in a response to each of the commands. The .NET framework does not control it anyhow.

The RFC 959 says only this:

  • LIST:
    The RFC says nothing about what the list should contains, just that:

    Since the information on a file may vary widely from system to system, this information may be hard to use automatically in a program, but may be quite useful to a human user.

  • NLST:

    The server will return a stream of names of files and no other information.

We do not know what you FTP server is, so we cannot give you more details.

Martin Prikryl
  • 167,268
  • 50
  • 405
  • 846