Jump to content

FTP Problem


Recommended Posts

Hi,

Client : XP Prof (Firewall, Antivirus Disabled)

Server: FedoraCore4 in local lan

I have copied the FTP.AU3 from this link http://www.autoitscript.com/forum/index.php?showtopic=12473

to this location : C:\Program Files\AutoIt3\Include

The following script does not work. No error message either.

I have tried to upload the script using FTPEx and it work fine.

But not via AutoIt3 script.

I have searched a lot on this forum, but could not comeup with any solution.

Please help!!!!

Thx

Vai

#include <GUIConstants.au3>
#include <INet.au3>
#include <ftp.au3>

    $server = '192.168.1.4'
    $username = 'root'
    $pass = 'mypassword'
    
    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass)
    $Ftpp = _FtpPutFile($Conn, 'C:\scrshot090.JPG', '/root/ZZZZZZZ.JPG')
    $Ftpc = _FTPClose($Open)

msgbox(16, "Status", "FTP Done")
Link to comment
Share on other sites

  • Developers

need to load the Dll first ..... Search should give you many hits since it has been asked many times...

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

you need two addional lines...

#include <GUIConstants.au3>

#include <INet.au3>

#include <ftp.au3>

$Dll=DllOpen("Wininet.dll")

$server = '192.168.1.4'

$username = 'root'

$pass = 'mypassword'

$Open = _FTPOpen('MyFTP Control')

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

$Ftpp = _FtpPutFile($Conn, 'scrshot090.JPG', '/root/ZZZZZZZ.JPG')

$Ftpc = _FTPClose($Open)

DllClose($Dll)

msgbox(16, $Conn, "FTP Done")

altho $conn returns 0 in this example which probably means $server, or $username,

or $pass is wrong.

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...