FTP error - "error retrieving file not a regular file"

harlechguy

Member
Licensed User
Longtime User
Hi, I am trying to use the 'net' library to retrieve files on application start up.

so far I have managed to connect to the FTP server - and using ftp.list am able to read the contents of my folders.

when it comes to the download element I get the following errors. have seen one similar post but it does not seem conclusive (upshot being I am stuck)

The error is:-
(RuntimeException) java.lang.RuntimeException: Error retrieving file.
550 /disk1/Web/Guy/quiz/: Not a regular file

the previous post I have seen is:-
http://www.b4x.com/forum/basic4andr...simple-working-ftp-list-code-2.html#post75523

and ideas or help much appreciated - thanks
 

harlechguy

Member
Licensed User
Longtime User
Hi Erel, am trying to download a zip file - the data in previous post is the serverpath as picked up by the event in below sub


Sub FTP_DownloadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = True Then flag1 = True
If Success = False Then
Log(LastException)
End If
End Sub

I can see the file on the ftp server - by using below code which gives a positive including the file I am testing with


Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
Log("server path " & ServerPath)
If Success = False Then
Log(LastException)
Else
Log("list success is " & Success)
For i = 0 To Folders.Length - 1
Log("list " & Folders(i).Name)
Next
For i = 0 To Files.Length - 1
Log(Files(i).Name & ", " & Files(i).Size & ", " & DateTime.Date(Files(i).Timestamp))
Next
End If
End Sub
 
Upvote 0

harlechguy

Member
Licensed User
Longtime User
Erel, just to add a little more information - I have a couple of apps that include ftp clients and I can retrieve the file manually so the issue does not appear to be with the ftp server / android per se.
 
Upvote 0
Top