It is my first blog so dont be so hard on me i lose lots of my time to try get this to work so i decide to share it 
so here is the code
so we add Inet1
i will show you how to copy a file from FTP
and here we go now that you copy your file you can read it and do what ever you want with it now if you want to send to FTP just seth the command to PUT and your done
i hope you like it
so here is the code
so we add Inet1
i will show you how to copy a file from FTP
Dim str_url As String Dim sFTPCommand As String 'the command send to ftp server Dim sFTPSrcFileName As String ' the name of the file that we search in ftp server Dim sFTPTgtFileName As String 'optional it is for new name when you copy (you dont have to seth this it will copy it as the name of original) Dim sFTPUser As String ' the username Dim sFTPPwd As String ' the password Dim fWait As Boolean dim sFTPurl as Strin ' the ip or the url of the FTP serve sFTPUser=txtUsername.Text sFTPPwd= txtPassword.Text str_url="ftp://" & sFTPUser & ":" & sFTPPwd & "@" & sFTPurl sFTPCommand = "GET" 'the command to FTP server sFTPSrcFileName = "Version.txt" 'it is the file on the server sFTPTgtFileName = "Ver.txt" ' it is the name of the file when you copy it on your HDD ' send the line to Inet1 to execute it Inet1.Execute str_url, sFTPCommand & Space(1) & sFTPSrcFileName & " " & sFTPTgtFileName 'NOW HERE IS THE TRICK YOU MUST WAIT TO BE SHURE IT IS DONE WITH THIS CYCLE HERE ' fWait = True Do Until fWait = False DoEvents fWait = Inet1.StillExecuting Loop
and here we go now that you copy your file you can read it and do what ever you want with it now if you want to send to FTP just seth the command to PUT and your done
0 Comments On This Entry
Tags
My Blog Links
Recent Entries
-
Downloading from FTP in VB6.0on Jul 30 2009 12:43 AM
Search My Blog
0 user(s) viewing
0 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)
|
|



Leave Comment









|