get unreable text file when using Internet Transfer Control to ftp(get) ascii fi 
Author Message
 get unreable text file when using Internet Transfer Control to ftp(get) ascii fi

The code is as below:

     Private Sub cmdDownload_Click()
         Dim strSite As String
         Dim strFile As String

         strOperation = "get /usr/report/" & txtFileName & " c:\temp\" & tx
     tFileName

         InetDownload.Protocol = icFTP
         'InetDownload.URL = strSite
         InetDownload.RemoteHost = "192.3.3.3"
         InetDownload.RemotePort = 21
         InetDownload.UserName = tUserName
         InetDownload.Password = tPassword

         Debug.Print InetDownload.URL, strOperation

         InetDownload.Execute InetDownload.URL

     End Sub

     Private Sub InetDownload_StateChanged(ByVal State As Integer)

         Select Case State
         Case 12
         Debug.Print "download successfully!"

         Case Else
         Debug.Print State

         End Select

     End Sub

     When I run them, I just get a file unreadble and the state is not 12.
     but when I change "strOperation" to "dir /usr/report/" the return state is
12.



Tue, 15 Apr 2003 10:55:55 GMT  
 get unreable text file when using Internet Transfer Control to ftp(get) ascii fi
hi,
the only thing I can c is - u r not getting a size of file before getting
file.
I found that it is absolutely necessary to get-size-by-chunk prior to GET
command
And if u will get answers like "ASCII is not supported" just test it urself.
I never had a single problem with that.
tested my FTP client with 11 very different FTP sites - receiving ASCII &
binaries perfectly
At the same time I have to admit that MSINET.OCX is poorly developed (a real
shame!) shell to wininet.dll
u may not be able to do many things with it.
so if u have time go APIs or other 3rd party control(s)
regards
Alex


Wed, 16 Apr 2003 04:42:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Ftp of ASCII files using Internet transfer Control

2. get unreable text file when using IC to get remote ASCII file

3. Getting a detailed directory listing using Internet transfer control, file sizes

4. getting File size using internet transfer control...

5. ASCII FTP Using Internet Transfer Control

6. Internet Transfer Control - FTP ASCII Files

7. Internet Transfer Control and ASCII FTP

8. Downloading file using Internet Transfer Control (not FTP server)

9. How to Ftp a file using Internet Transfer Control in VB

10. Downloading file using Internet Transfer Control (not FTP server)

11. MS Active X controls - Getting FTP to switch to binary transfer mode

12. Internet transfer control not getting the full page

 

 
Powered by phpBB® Forum Software