Shyke Posted April 3, 2006 Posted April 3, 2006 I am not sure what is happening here. I don't seem to be able to find a script to download from FTP and there InetGet doesn't work on this FTP server. Help?
Moderators SmOke_N Posted April 3, 2006 Moderators Posted April 3, 2006 I am not sure what is happening here. I don't seem to be able to find a script to download from FTP and there InetGet doesn't work on this FTP server.Help?http://www.autoitscript.com/forum/index.ph...ic=23971&hl=ftp_FTPGetFile() I believe, his script has it... although I don't think we ever got the progress bar to work. 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.
Shyke Posted April 3, 2006 Author Posted April 3, 2006 Hmm...I figure ftpget should work like this:$Ftgf = _FtpGetFile ($Conn, 'live.txt', 'live.txt')Does it not?
Moderators SmOke_N Posted April 3, 2006 Moderators Posted April 3, 2006 (edited) Hmm...I figure ftpget should work like this:Does it not?Your second parameter doesn't look right, there's no path to the file, your 3rd parameter should at leaset have the directory your going to install it on don't you think? Edited April 3, 2006 by SmOke_N 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.
Moderators SmOke_N Posted April 3, 2006 Moderators Posted April 3, 2006 Same directory.Yeah, but... have you tried giving it the full directory? Better yet... What all have you tried... I was able to get the other example to download myself.... so it must be on your end, or the other. 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.
Shyke Posted April 3, 2006 Author Posted April 3, 2006 Alright. Try to download "live.txt" from "sweangels.no-ip.com:24". Username is "test" and password is "test1".
billmez Posted April 4, 2006 Posted April 4, 2006 Alright.Try to download "live.txt" from "sweangels.no-ip.com:24". Username is "test" and password is "test1".I don't believe you can include the port as part of the domain, you have to include the port as a connection parameter.You need to use _FTPOpen() to open a sesion then _FTPConnect() to the handle assigned by the $handle = _FTPOpen() call. The port to connect to is a parameter of _FTPConnect(). Use the connection handle $connection = _FTPConnect() for the download operation.The connect function is documented with the parameters including the port.
Shyke Posted April 4, 2006 Author Posted April 4, 2006 I try:$username = "test"$password = "test1"$server = "sweangels.no-ip.com:24"$Open = _FTPOpen ('MyFTP Control')$Conn = _FTPConnect ($Open, $server, $username, $password)$Ftgf = _FtpGetFile ($Conn, '/live.txt', 'live.txt')$Ftpc = _FTPClose ($Open)And I get nada.
billmez Posted April 4, 2006 Posted April 4, 2006 I try:And I get nada.I repeat:I don't believe you can include the port as part of the domain, you have to include the port as a connection parameter.Read the function description in the UDF.
Shyke Posted April 4, 2006 Author Posted April 4, 2006 Alright, I see... lol.Further refined:$username = "test"$password = "test1"$server = "sweangels.no-ip.com"$Open = _FTPOpen ('MyFTP Control')$Conn = _FTPConnect ($Open, $server, $username, $password, 24)$Ftgf = _FtpGetFile ($Conn, '/live.ini', 'live.ini', 2, 0, 0, 0)$Ftpc = _FTPClose ($Open)No go.
Shyke Posted April 4, 2006 Author Posted April 4, 2006 $username = "test"$password = "test1"$server = "sweangels.no-ip.com"InetGet("ftp://" & $username & ":" & $password & "@" & $server & "/live.ini", "live.ini", 1, 0)Is a no go either.
w0uter Posted April 4, 2006 Posted April 4, 2006 try using the older version of my udf that uses ftp.exe if that one cant do it, nothing can My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
Moderators SmOke_N Posted April 4, 2006 Moderators Posted April 4, 2006 do you have a valid username and password to test? 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.
Shyke Posted April 4, 2006 Author Posted April 4, 2006 Username: test Password: test1 The software creates the file that I am trying to get (a 0 byte file) in the directory specified by there never gets to be more then 0 bytes in that file and it just idles until the server d/cs you. Help?
billmez Posted April 5, 2006 Posted April 5, 2006 Username: testPassword: test1The software creates the file that I am trying to get (a 0 byte file) in the directory specified by there never gets to be more then 0 bytes in that file and it just idles until the server d/cs you.Help?Try setting the transfer mode to ASC (if it is indeed an ASCII ini file) and if you are behind a firewall/router, set the connection mode to PASSIVE.Under a normal connection the FTP server initiates the transfer/dialogue, but if you are behind a firewall (router, NAT), the server can't determine your location, so passive mode is used to have the client (your sytem) initiate the dialogue, and the server responds.I have seen many connection issues due to this with MS FTP.exe since it doesn't support passive transfers.
Shyke Posted April 5, 2006 Author Posted April 5, 2006 (edited) Heh... I am gonna have to ask how to set it to passive mode and ASC... I thought it was already in ASC but how can you set it to passive? $Open = _FTPOpen ('MyFTP Control') $Conn = _FTPConnect ($Open, $server, $username, $password, 24) $Ftgf = _FtpGetFile ($Conn, '/live.ini', 'live.ini', 1, 0, 0, 0) $Ftpc = _FTPClose ($Open) That even remotely close? lol. Edited April 5, 2006 by Shyke
billmez Posted April 5, 2006 Posted April 5, 2006 Heh...I am gonna have to ask how to set it to passive mode and ASC... I thought it was already in ASC but how can you set it to passive?on the _FTPConnect() function set the $l_Flags parameter to 0x08000000, and in the _FTPGetFile() function set$l_Flags ; - 1 for transferring the file in ASCII (Type A transfer method) or ; - 2 for transferring the file in Binary (Type I transfer method).and$l_Fail - Allow local file to be overwritten if it exists; - -1 Don't allow overwrite (default); - 0 Allow overwriteThe functions have the transfer default as binary, active transfer, and don't overwrite existing file. These are documented in the functions in the udf.
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