Hello all.
I have problem with FtpGetFile. The code below works - file is downloaded, but...
Original file looks like this (CSV with Tab):
2012-09-21 02:46:20 -0,16 -0,03 -0,08 0,01
2012-09-21 02:46:30 -0,16 -0,03 -0,07 0,01
2012-09-21 02:46:40 -0,16 -0,03 -0,07 0,01
2012-09-21 02:46:50 -0,16 -0,03 -0,07 0,01
After download look like this:
2012-09-21 02:46:20 -0,16 -0,03 -0,08 0,01ഀഀ2012-09-21 02:46:30 -0,16 -0,03 -0,07 0,01ഀഀ2012-09-21 02:46:40 -0,16 -0,03 -0,07 0,01ഀഀ2012-09-21 02:46:50 -0,16 -0,03 -0,07 0,01
The code:
hInternet = InternetOpen("FTPTransfer", INTERNET_OPEN_TYPE_DIRECT, vbNullString, vbNullString, INTERNET_FLAG_NO_CACHE_WRITE)
hConnect = InternetConnect(hInternet, sServerName, sFtpPort, sFtpUserName, sFtpPassword, INTERNET_SERVICE_FTP, INTERNET_FLAG_EXISTING_CONNECT Or INTERNET_FLAG_PASSIVE, &H0)
bRet = FtpGetFile(hConnect, FtpFile, LocalFile, False, INTERNET_FLAG_RELOAD, &H1, &H0)
Thanks for the suggestions.
I have problem with FtpGetFile. The code below works - file is downloaded, but...
Original file looks like this (CSV with Tab):
2012-09-21 02:46:20 -0,16 -0,03 -0,08 0,01
2012-09-21 02:46:30 -0,16 -0,03 -0,07 0,01
2012-09-21 02:46:40 -0,16 -0,03 -0,07 0,01
2012-09-21 02:46:50 -0,16 -0,03 -0,07 0,01
After download look like this:
2012-09-21 02:46:20 -0,16 -0,03 -0,08 0,01ഀഀ2012-09-21 02:46:30 -0,16 -0,03 -0,07 0,01ഀഀ2012-09-21 02:46:40 -0,16 -0,03 -0,07 0,01ഀഀ2012-09-21 02:46:50 -0,16 -0,03 -0,07 0,01
The code:
hInternet = InternetOpen("FTPTransfer", INTERNET_OPEN_TYPE_DIRECT, vbNullString, vbNullString, INTERNET_FLAG_NO_CACHE_WRITE)
hConnect = InternetConnect(hInternet, sServerName, sFtpPort, sFtpUserName, sFtpPassword, INTERNET_SERVICE_FTP, INTERNET_FLAG_EXISTING_CONNECT Or INTERNET_FLAG_PASSIVE, &H0)
bRet = FtpGetFile(hConnect, FtpFile, LocalFile, False, INTERNET_FLAG_RELOAD, &H1, &H0)
Thanks for the suggestions.