Jump to content
Sign in to follow this  
sundeep

FTP script is not working....please help.

Recommended Posts

sundeep

Hi,

I have went through the forum thoroughly from the past two days :o and most of them are pointing to the following threads:

http://www.autoitscript.com/forum/index.ph...6246&hl=ftp

http://www.autoitscript.com/forum/index.php?showtopic=12473

But when I compile and run these scripts, I get a large list of errors :

"C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(1,10) : ERROR: can't open include file "FTP.au3"

#include "FTP.au3"

~~~~~~~~~^

C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(9,27) : ERROR: _FTPOpen(): undefined function.

$Open = _FTPOpen("MyFTP",0)

~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(11,57) : ERROR: _FTPConnect(): undefined function.

$Conn = _FTPConnect($Open, $server, $username, $pass, 21)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(14,69) : ERROR: _FtpPutFile(): undefined function.

$Ftpp = _FtpPutFile($Conn, "C:\TEST.txt", "/public_html/Autoit_Test")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(18,24) : ERROR: _FTPClose(): undefined function.

$Ftpc = _FTPClose($Open)

~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3 - 5 error(s), 0 warning(s)"

I installed the latest beta version and tried compiling the code using it with the same set of errors.

I clearly understand that I am making a major mistake but can someone point it out please.

This is the exact code I am trying to compile:

#include <FTP.au3>

$server = 'ftp://My Server Ip'

$username = 'anonymous'

$pass = '*****'

$Open = _FTPOpen('MyFTP')

$Conn = _FTPConnect($Open, $server, $username, $pass)

$Ftpp = _FTPPutFile($Conn, 'doc.txt', '/doc2.txt')

MsgBox(0,0,$Ftpp)

;$FtpMD = _FTPMakeDir($Conn, "/asdf")

$Ftpc = _FTPClose($Open)

Will the above code work ? I have downloaded a freeware ftp server, which uses the username and password as "anonymous" and "*****" by default and port as 21. I have installed both the client and the server on my system.

Please do not point me to any threads because that is what I have done from the past 2 days with no satisfactory results :D

I have installed the beta version also and I have tried running the script with it with no luck :-(, assuming the standard version v 3.0.0.0 does not include the library ftp.au3.

Thanks in advance for all the help!

Regards,

Sun.

Share this post


Link to post
Share on other sites
sundeep

Hi,

I have went through the forum thoroughly from the past two days :o and most of them are pointing to the following threads:

http://www.autoitscript.com/forum/index.ph...6246&hl=ftp

http://www.autoitscript.com/forum/index.php?showtopic=12473

But when I compile and run these scripts, I get a large list of errors :

"C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(1,10) : ERROR: can't open include file "FTP.au3"

#include "FTP.au3"

~~~~~~~~~^

C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(9,27) : ERROR: _FTPOpen(): undefined function.

$Open = _FTPOpen("MyFTP",0)

~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(11,57) : ERROR: _FTPConnect(): undefined function.

$Conn = _FTPConnect($Open, $server, $username, $pass, 21)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(14,69) : ERROR: _FtpPutFile(): undefined function.

$Ftpp = _FtpPutFile($Conn, "C:\TEST.txt", "/public_html/Autoit_Test")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(18,24) : ERROR: _FTPClose(): undefined function.

$Ftpc = _FTPClose($Open)

~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3 - 5 error(s), 0 warning(s)"

I installed the latest beta version and tried compiling the code using it with the same set of errors.

I clearly understand that I am making a major mistake but can someone point it out please.

This is the exact code I am trying to compile:

#include <FTP.au3>

$server = 'ftp://My Server Ip'

$username = 'anonymous'

$pass = '*****'

$Open = _FTPOpen('MyFTP')

$Conn = _FTPConnect($Open, $server, $username, $pass)

$Ftpp = _FTPPutFile($Conn, 'doc.txt', '/doc2.txt')

MsgBox(0,0,$Ftpp)

;$FtpMD = _FTPMakeDir($Conn, "/asdf")

$Ftpc = _FTPClose($Open)

Will the above code work ? I have downloaded a freeware ftp server, which uses the username and password as "anonymous" and "*****" by default and port as 21. I have installed both the client and the server on my system.

Please do not point me to any threads because that is what I have done from the past 2 days with no satisfactory results :D

I have installed the beta version also and I have tried running the script with it with no luck :-(, assuming the standard version v 3.0.0.0 does not include the library ftp.au3.

Thanks in advance for all the help!

Regards,

Sun.

Share this post


Link to post
Share on other sites
nobbe

search for ftp.au3 on the forum and include it in your directory (of your main script file)

"C:\Documents and Settings\sundeepl\Desktop\FOXTEL\FTP_Ex.au3(1,10) : ERROR: can't open include file "FTP.au3"

#include "FTP.au3"

Share this post


Link to post
Share on other sites
sundeep

Thanks guys :D for now...I am trying to meddle with it.... :o , I may bother you again...

Regards,

Sun.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.