FTP - File not found

Dogbonesix

Active Member
Licensed User
Longtime User
I have a small FTP Sub to transfer files from my FTP server to my Cell phone. It works some of the time and sometimes not.

I get the error 'File Not Found' but the File does exist. I can download it using Core or ftpCafe. So, I am thinking it is some encoding problem but not sure how or why... I keep my source files and target files in the same folder - always. Some files will reliably transfer will others will never transfer ever though the file name correct - at least as looking at it - character by character.

I can still make the transfer but I have to use ftpCafe and it is embarrassing when demonstrating that I have to resort to another app..

Any suggestions will be appreciated.
 

Dogbonesix

Active Member
Licensed User
Longtime User
Please compare what I have...

The full path: public_html/rintintin/Hyper-X/Support_Docs
The FTP Command less the pasword:
FTP.Initialize("FTP", "ftp.dogbone6.org", 21, "[email protected]....."

This transfer fails ====
I copied the name in CoreFTP so it should be correct and the name matches in CPanel. l then ran it as embedded code and it fails. I can run it as a selection and it still fails see the process that works below.

Dim ftpit As String
ftpit = "2text.txt"
FTP.DownloadFile("/Hyper-X/Support_Docs/" & ftpit, True, "/mnt/sdcard/Documents", ftpit)

This works ==== as a selection in a Listview that is pushed to Label2
Dim ftpit As String
ftpit = Label2.text

FTP.DownloadFile("/Hyper-X/Support_Docs/" & ftpit, True, "/mnt/sdcard/Documents", ftpit)

Where Label2.text is "2007_Pacifica_Battery_23_Nov_2010_pg_1.JPG"

And what seems odd is than MOST files older than 20 Aug 2012 seem to transfer while NEWER files will not transfer...BUT transfers never fail in CoreFTP, FTPCafe or CPanel. I am looking for hidden characters or Encoding but have 'No Joy' so far.
 
Upvote 0

Dogbonesix

Active Member
Licensed User
Longtime User
A Follow Up to my last post

I just found I can get a list of a directory Da. FTP.list.

Not sure how to actually use it/view the list - but I am going to try. Help...

I actually moved my account (same provider) to a newer account. It has a new IP but it is curious as the files I can transfer or not is near that change.
 
Upvote 0

Dogbonesix

Active Member
Licensed User
Longtime User
Success

I found the problem, the code below does not work for me but everything else works. .

Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
FTP.Initialize("FTP", "ftp.example.com", 21, "user", "password")
End If

The problem is that "ftp.example.com" must be "example.com" for me to get it to work. I am not sure why I could find some file while other I could not. But when I removed the "fpt." it works like a champ.
 
Upvote 0
Top