tags:

views:

8

answers:

0

Hello everybody.

I am bussy with a script, what must upload a Zip-archive to a ftp server. This works, unfortuantely the Zip file on the ftp server is incorrupt, the local file before it is placed on the server works fine. Does someone know what the problem could be?

This is de relative code:

Private Sub ftpWorker_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles ftpWorker.DoWork
    Dim ftpOpen = InternetOpen("FTP", 0, vbNullString, vbNullString, 0)
    Dim ftpConnection = InternetConnect(ftpOpen, "server", 0, "username", "password", 1, 0, 0)
    ftpWorker.ReportProgress(20)
    FtpPutFile(ftpConnection, hhmTracksFilePath, "/temp-tracks-folder/" & hhmTracksFileName & ".hhm-tracks", 1, 0)
End Sub

All the code could be find here:

http://pastebin.com/Vt39ck0T

Thanx!

Edit: maybe the problem is that it is a binary file, and the ftp upload it as a ascii??