KFTP Download

MarcoM149
Posts: 5
Joined: Mon Jul 14, 2014 4:10 pm

KFTP Download

Post by MarcoM149 » Mon Jul 14, 2014 4:26 pm

hi,
i'm trying to use KFTP in access program (VBA)
Connect works fine
Changedir works fine
alseo CreateNewDirectory works fine
but when i try to download a file i receive: Unable to get file size
Why?
this is the code:

If Not Me.kftp.Connect(WOS02FTP, WOS02UserID, WOS02PassW, WOS02Porta) Then
MsgBox "Errore di connessione " & kftp.LastError
End If
If Not Me.kftp.ChangeWorkingDir(WOS02CartellaRemota) Then
MsgBox "Errore di ChangeDir " & kftp.LastError
End If
If Not Me.kftp.DownloadFile(WOS02Remotefile, mydir, 0, False) Then
MsgBox "Errore di Download " & kftp.LastError
End If

kftp.lasterror=Unable to get file size

thanks for help
Marco

Kyle_Katarn
Site Admin
Posts: 969
Joined: Sun Jul 03, 2011 8:13 pm

Re: KFTP Download

Post by Kyle_Katarn » Mon Jul 14, 2014 4:29 pm

Hi,

Are you a regsitered user ?
Which IDE do you use ? Visual Basic 6 ?
Does the problem occurs on all file ? Have you tried a different FTP server ?
Which version of K-FTP do you use ?

MarcoM149
Posts: 5
Joined: Mon Jul 14, 2014 4:10 pm

Re: KFTP Download

Post by MarcoM149 » Mon Jul 14, 2014 5:38 pm

hi,
tanks for your questions.
Yes, i'm registred.
I'm using VBA (Access 2010)
I've tried with more than one file, but only with one FTP Server (i'haven't another for now)
The version of K-FTP is 4.11.501
thanks
Marco

MarcoM149
Posts: 5
Joined: Mon Jul 14, 2014 4:10 pm

Re: KFTP Download

Post by MarcoM149 » Mon Jul 14, 2014 8:01 pm

Kyle_Katarn wrote:Hi,

Are you a regsitered user ?
Yes i'm registred

Which IDE do you use ? Visual Basic 6 ?
I'm using VBA (Access 2010)

Does the problem occurs on all file ? Have you tried a different FTP server ?
The problem occur on many files. I tried only an FTP server (i haven't another)

Which version of K-FTP do you use ?
version 4.11.501

Thanks for your questions
Marco

Kyle_Katarn
Site Admin
Posts: 969
Joined: Sun Jul 03, 2011 8:13 pm

Re: KFTP Download

Post by Kyle_Katarn » Mon Jul 14, 2014 8:49 pm

I'd suggest ot ogive a try on another server, in order to check if problem comes from server / specific interoperability issue or client implementation.

MarcoM149
Posts: 5
Joined: Mon Jul 14, 2014 4:10 pm

Re: KFTP Download

Post by MarcoM149 » Tue Jul 15, 2014 8:12 am

i tried with nother server, but i had same error: Unable to get file size
:o
Marco

MarcoM149
Posts: 5
Joined: Mon Jul 14, 2014 4:10 pm

Re: KFTP Download

Post by MarcoM149 » Wed Jul 16, 2014 6:46 am

any idea?

Kyle_Katarn
Site Admin
Posts: 969
Joined: Sun Jul 03, 2011 8:13 pm

Re: KFTP Download

Post by Kyle_Katarn » Wed Jul 16, 2014 8:29 pm

Do you confirm that error ONLY occurs on DownloadFile ?

agaeta
Posts: 3
Joined: Wed Jul 13, 2016 4:09 pm

Re: KFTP Download

Post by agaeta » Sun Jul 31, 2016 1:58 pm

Hi MarcoM149

Try to change mode to Binary before download the file.

kftp1.ChangeTransfertMode Binary

I was having same problem and file downloaded corrupted.

agaeta
Posts: 3
Joined: Wed Jul 13, 2016 4:09 pm

Re: KFTP Download

Post by agaeta » Sun Jul 31, 2016 2:00 pm

Try setting to binary before downloading:

kftp1.ChangeTransfertMode Binary

Post Reply