Alterego Posted March 13, 2005 Share Posted March 13, 2005 here's a way to test whether or not a file was downloaded properly. @InetGetBytesRead equals FileGetSize(file after downloading) equals InetGetSize(file on remote server). They will all have the exact same byte count (which we would only expect in utopia, but hey it works!) just an example so you can see. hope someone finds it useful : InetGet("http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe", @TempDir & "\autoit-v3-setup.exe", 0, 1) While @InetGetActive Sleep(250) WEnd MsgBox(1, "", "Remote Size: " & InetGetSize("http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe") & @CRLF & "Local Size: " & FileGetSize(@TempDir & "\autoit-v3-setup.exe") & @CRLF & "Bytes downloaded: " & @InetGetBytesRead) FileDelete(@TempDir & "\autoit-v3-setup.exe") This dynamic web page is powered by AutoIt 3. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now