Jump to content

Recommended Posts

Posted

Yup, I am a 3rd tier tech, I am a programmer. I cannot get this thing to download via FTP. HTTP works. I tested the URL In IE and it works from IE, but not from AutoIt. Now I am behind a firewall and as a result that requires I use PASV mode on my FTP. I do not see an option for that in AutoIt. Is it possible that it is defaulting to off? I looked at that FTP.au3 file, but it seems they did not get around to create a "get" function.

Here is some debug information....

MsgBox(0, 'Debug 01', InetGet("ftp://FTP.Dangerous-Minds.NET/README.txt", @TempDir & "\" & "README.txt"))
MsgBox(0, 'Debug 02', @Error)

The above code returns "0" in each messagebox.

I tried it in both binary and ASCII mode.

My OS is Windows 2000-SP4

IE is Version 6.0.2800.1106

Software firewall is disabled.

  • Moderators
Posted

Yup, I am a 3rd tier tech, I am a programmer. I cannot get this thing to download via FTP. HTTP works. I tested the URL In IE and it works from IE, but not from AutoIt. Now I am behind a firewall and as a result that requires I use PASV mode on my FTP. I do not see an option for that in AutoIt. Is it possible that it is defaulting to off? I looked at that FTP.au3 file, but it seems they did not get around to create a "get" function.

Here is some debug information....

MsgBox(0, 'Debug 01', InetGet("ftp://FTP.Dangerous-Minds.NET/README.txt", @TempDir & "\" & "README.txt"))
MsgBox(0, 'Debug 02', @Error)

The above code returns "0" in each messagebox.

I tried it in both binary and ASCII mode.

My OS is Windows 2000-SP4

IE is Version 6.0.2800.1106

Software firewall is disabled.

It worked for me on XP Pro SP2... took a while (10 or 15 seconds) to connect to the FTP server, even when I just put the address in the browser manually:
InetGet("ftp://FTP.Dangerous-Minds.NET/README.txt", @TempDir & "\" & "README.txt")

Do
    Sleep(10)
Until Not @InetGetActive

If FileExists(@TempDir & "\" & "README.txt") Then
    $FOpen = FileOpen(@TempDir & "\" & "README.txt", 0)
    $Fread = FileRead(@TempDir & "\" & "README.txt", FileGetSize(@TempDir & "\" & "README.txt"))
    FileClose($FOpen)
    MsgBox(0, 'Downloaded File', $Fread)
EndIf

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

I don't know what is wrong with your environment but the following code work under WinXP/Sp2

$s=InetGet("ftp://FTP.Dangerous-Minds.NET/README.txt", @TempDir & "\" & "README.txt")
    MsgBox(262144,'Debug line ~13','Selection:' & @lf & '$s' & @lf & @lf & 'Return:' & @lf & $s & @lf & @lf & '@Error:' & @lf & @Error);### Debug MSGBOX

Notice the way to be for sure to have the @error I thing in your case you are displaying the one return by msgbox.

I have no access to the net with a win2K version so I cannot recheck with your environment.

You can use a net monitor as Ethereal to see what is going on. :)

Posted

Yea I am fairly sure this is a problem with PASV mode. Anyhow my solution to this was using wget for windows. wGet is simplay a dos based tool that originated in the linux envirnment. It is used to get files via ftp and web much like your command. The difference is it supports RESUME! I load it in a hidden dos window and this seems to work well as a work around. It requires no install so I can package it right into the script.

RunWait("Path\To\wget.exe --non-verbose --tries=2 --continue --passive-ftp ftp://FTP.Dangerous-Minds.NET/README.txt", @TempDir, @SW_HIDE)

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
×
×
  • Create New...