Jump to content

Help , dowlnload file fron site


trescon
 Share

Recommended Posts

Good evening, I with these simple lines I ever downloaded the files from my website for some computers that use of procedures made by me.
Since the PC that interests me most is to be updated on WIN10 I download more files, in fact I delete those that already exist.
Taking into account that no expert will ask you a suggestion.
I attach the lines I use to download files, premett that _FTP_FileGet that I do are about a hundred.
Thanks to those who want to help me.
Alberto

#include <FTPEx.au3>

    $open = _FTP_Open('FTP Uploader')
    $connessione = _FTP_Connect($open, $host_miei, $username_miei, $pass_miei)
    _FTP_FileGet($connessione, $sito & "programmi/Shell/Shell.exe",$Pc & "programmi/Shell/Shell.exe")
    _FTP_FileGet($connessione, $sito & "programmi/Shell/Download/Download.exe",$Pc &  "programmi/Shell/Download/Download.exe")

 

Edited by trescon

Thank You

Alberto

---------------------------------------------------

I am translate with Google.

Link to comment
Share on other sites

Here is an example:

AdlibRegister("AutoCancel")

While 1
    Sleep(10)
WEnd

Func AutoCancel()
    If WinActive("[Class:IEFrame]") Then
        Local $hIE = WinGetHandle("[Class:IEFrame]")
        Local $hCtrl = ControlGetHandle($hIE, "", "[ClassNN:DirectUIHWND1]")
        Local $aPos = ControlGetPos($hIE, "", $hCtrl)
        Local $aWinPos = WinGetPos($hIE)
        If ControlCommand($hIE, "", $hCtrl, "IsVisible") And $aPos[1] > .75 * $aWinPos[3] Then ; Check if the control is in the bottom 25% of the page.
            ControlClick($hIE, "", $hCtrl, "primary", 1, $aPos[2] - 70, $aPos[3] - 30)
            Sleep(500)
            ControlSend($hIE, "", $hCtrl, "{enter}")
        EndIf
    EndIf
EndFunc   ;==>AutoCancel
Link to comment
Share on other sites

If you want to download directly, here is another example:

Global $path = @DesktopDir & "\test.exe"
$Surl = "http://download.thinkbroadband.com/5MB.zip"
FileDownload($Surl, $path)
Func FileDownload($url, $SavePath)
Local $xml, $Stream
$xml = ObjCreate("Microsoft.XMLHTTP"); Corrected from winhttp.winhttprequest.5.1 for faster dl
$Stream = ObjCreate("Adodb.Stream")
$xml.Open("GET", $url, 0)
$xml.Send
$Stream.Type = 1
$Stream.Open
$Stream.write($xml.ResponseBody)
$Stream.SaveToFile($SavePath)
$Stream.Close
EndFunc ;==>FileDownload
Link to comment
Share on other sites

And where are the problem downloading this 100 of files? When you know how to download one, you can download all you want using the same method.

Put all files you want hardcoded in a array. Open FTP and connect, after loop thrue the array and call _FTP_FileGet. When downloads completed, close the FTP and the Internetsession.

Link to comment
Share on other sites

Thanks for the attention.
But it's what he does, performs about 100 ftp and on a pc it works well.
On another PC instead the procedure starts, but the only thing it does is delete the old files that should override but not download the new.
I do not understand why on a PC and is on the other not.
I was looking for just suggestions that allowed me to understand why the program behaves in two different ways.
Thank you
Alberto

Thank You

Alberto

---------------------------------------------------

I am translate with Google.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...