I have written a B4A app and corresponding vb.net windows application to communicate via an FTP server. I've tested this on 3 different FTP servers and all works well as expected. I signed up for hosting via a new ISP as the old one didn't allow multiple FTP accounts, and have started having problems.
When I try to get a file list (as below), Success is true, but the folders and files arrays are empty.
myftp.Initialize("myftp", cfg.address, cfg.port, cfg.username, cfg.password)
myftp.List(full_startfolder & "/to_handheld")
Wait For myftp_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
The folders on the ftp server are:
/
data_in
15
16
data_out
15
16
When I try in the windows application, the stream returned from the FTP server is as I would expect when listing the root folder
.
..
data_in
data_out
but if I specify the data_in folder, the data returned is
data_in/15
data_in/16
On the other FTP servers, this would return
.
..
15
16
It seems that this FTP server is returning text data in a different format to other servers.
I tried directly send the "DIR" and "NLST" ftp commands in B4A using FTP.SendCommand, but they fail with no reply code or reply string being returned.
I'm a bit stuck as to how I make progress with this. Am I even allowed to use FTP.SendCommand like this? Is there any way of changing the parsing of the text returned from the FTP server so I can make FTP.List work? I hope someone can help
Thanks,
Darren