Sparrowlord Posted May 23, 2006 Share Posted May 23, 2006 Hey, well I have tryed messing around with FTP.au3 for about 4 hours now and I could never get anything to work... So, if someone could show me a small example on how to upload a .html file to a ftp server I would greatly like that. Thanks, Lord Link to comment Share on other sites More sharing options...
mr.underperson Posted May 23, 2006 Share Posted May 23, 2006 The example that comes with it...http://www.autoitscript.com/forum/index.ph...pe=post&id=2813works great.If you are having troubles, try testing on a local ftp server, so you can see both sides of the process.-mu Link to comment Share on other sites More sharing options...
Sparrowlord Posted May 23, 2006 Author Share Posted May 23, 2006 Well, I cant get it working and heres what I am doing... #include <FTP.au3> $server = '*****.org' $username = 'tz@*****.org' $pass = '*********' $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'C:\WINDOWS\Notepad.exe', '/update/Example.exe') $Ftpc = _FTPClose($Open) Link to comment Share on other sites More sharing options...
mr.underperson Posted May 23, 2006 Share Posted May 23, 2006 And the ftp server really has a folder called "update" in its *root* directory?And that folder has upload permissions?After all that, the ftp udf doesn't give much in the way of feedback, so do double-check by some other method (regular ftp client), because it may have worked and you didn't realize. It wouldn't be the first time that's happened.Also, try with a regular (not .exe) file. Some hosts don't allow .exe file types.-mu Link to comment Share on other sites More sharing options...
Sparrowlord Posted May 23, 2006 Author Share Posted May 23, 2006 Heres what I am getting: C:\Documents and Settings\Administrator\Desktop\log2ftp.au3(5,10) : ERROR: can't open include file <FTP.au3> #include <FTP.au3> ~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\log2ftp.au3(10,33) : ERROR: _FTPOpen(): undefined function. $Open = _FTPOpen('MyFTP Control') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\log2ftp.au3(11,53) : ERROR: _FTPConnect(): undefined function. $Conn = _FTPConnect($Open, $server, $username, $pass) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\log2ftp.au3(12,73) : ERROR: _FtpPutFile(): undefined function. $Ftpp = _FtpPutFile($Conn, 'C:\WINDOWS\Notepad.exe', '/test/Example.exe') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\log2ftp.au3(13,24) : ERROR: _FTPClose(): undefined function. $Ftpc = _FTPClose($Open) ~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\log2ftp.au3 - 5 error(s), 0 warning(s) My server is allowed exe files, because I have a few on there. Link to comment Share on other sites More sharing options...
MFerris Posted May 24, 2006 Share Posted May 24, 2006 Heres what I am getting: C:\Documents and Settings\Administrator\Desktop\log2ftp.au3(5,10) : ERROR: can't open include file <FTP.au3> #include <FTP.au3> ~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\log2ftp.au3(10,33) : ERROR: _FTPOpen(): undefined function. $Open = _FTPOpen('MyFTP Control') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\log2ftp.au3(11,53) : ERROR: _FTPConnect(): undefined function. $Conn = _FTPConnect($Open, $server, $username, $pass) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\log2ftp.au3(12,73) : ERROR: _FtpPutFile(): undefined function. $Ftpp = _FtpPutFile($Conn, 'C:\WINDOWS\Notepad.exe', '/test/Example.exe') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\log2ftp.au3(13,24) : ERROR: _FTPClose(): undefined function. $Ftpc = _FTPClose($Open) ~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\log2ftp.au3 - 5 error(s), 0 warning(s) My server is allowed exe files, because I have a few on there. Those are not FTP/script errors, those are compile errors. It looks like your script can't access the FTP.au3 file. You either need to place FTP.au3 into your Include folder in your AutoIt installed folder, OR place the functions you need from within FTP.au3 into your own program. FTP.au3 is not included with AutoIt installation, maybe that's where the confusion lies? Link to comment Share on other sites More sharing options...
mr.underperson Posted May 24, 2006 Share Posted May 24, 2006 incredible -mu 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