Sign in to follow this  
Followers 0
Sparrowlord

Some Help Please *Not Hard*

7 posts in this topic

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

Share this post


Link to post
Share on other sites



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)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

incredible :)

-mu

Share this post


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
Sign in to follow this  
Followers 0