Re: GetFiles and LIST/NLST - WeOnlyDo Discussion board

Re: GetFiles and LIST/NLST (General questions)

by sauerc, Wednesday, August 12, 2009, 19:33 (5369 days ago) @ wodDamir


Are you 100 sure that LIST doesn't retrieve anything? NLST command will only return names of folders/files.

Yes, I did a ftp -d from a windows machine, when the ftp client sends LIST (dir from windows ftp) you get nothing but when the ftp client sends NLST (ls from windows ftp) you get the directory listing back. It's very strange. I've asked what server software they are using since I've never seen this behavior before.


If that's what you really need, you should try using ListNames method (instead of ListDir) which sends NLST by default.

Can you try that?

I'm not using ListNames or ListDir. We call Connect and then GetFiles. With a non-broken server, after we call GetFiles we immediately go into the LoopItem event for every item found in the directory and then go into the Done event. With this broken server the call to GetFiles immediately goes to the Done event, as if it can't see any files.


Complete thread: