Jump to content

Recommended Posts

I've been trying to figure out the ftp UDF but it doesn't seem to work for me, so I started looking at some other alternatives that are supposed to work with ftp. I'm using the Mozilla FTP as a test URL but I can't seem to get this script to actually download the file to the local machine. Am I doing something wrong?


Func GetfromFTP($sURL,$sUsername='',$sPassword='' )
    local $sFilePath=@TempDir&"\",$digits=20,$fn,$aSpace[3]
    For $i=1 to $digits
        $fn &= $aSpace[Random(0,2,1)]
    If $sUsername='' AND $sPassword='' then
        InetGet("ftp://"&$sURL&"/", $sFilePath, 1)
        InetGet("ftp://"&$sUsername&":"&$sPassword&"@"&$sURL&"/", $sFilePath, 1)


Link to post
Share on other sites

I can't seem to access "ftp.mozilla.org" with a ftp protocol. I can however access it with http or https protocol.

This works no problem for me:

InetGet("https://ftp.mozilla.org/bundles/msn/us/win32/en-US/Firefox%20Setup.exe", @TempDir&"\")


Link to post
Share on other sites

Well, that is odd. I tried your line of code and it executes without error, but no file is actually saved to the temp dir.


I'm using Windows 10 (I don't know if that matters).

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...