Jump to content

Ftp Problems


Recommended Posts

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.13.13 (beta)
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#Include <_Ftp.au3>

$server = "Private"
$username = "Private"
$password = "Private"

$Open = _FTPOpen("MyFTP")
If @error Then
    MsgBox(0, "", "Error Opening")
EndIf
$Conn = _FTPConnect($Open, $server, $username, $password)
If @error Then
    MsgBox(0, "", "Error Connecting")
EndIf
$Ftpp = _FTPPutFile($Conn, "C:\Test.txt\", "/Test/")
If @error Then
    MsgBox(0, "", "Error Uploading")
EndIf
$Ftpc = _FTPClose($Open)

The error is uploading. Test.txt exists and test folder on ftp server exists.

Edited by Godly
Link to comment
Share on other sites

Use my FTP.au3 and to see examples of it.

#Include <FTP.au3>

const $Host = ''
const $Login = ''
const $Password = ''

local $hFtp, $hSession

_FTP_Startup()
$hFtp = _FTP_Open('MyFtp')
$hSession = _FTP_Connect($hFtp, $Host, $Login, $Password)
_FTP_PutFile($hSession, 'C:\Test.txt', '/Test/Test.txt')
_FTP_Disconnect($hSession)
_FTP_Close($hFtp)
_FTP_Shutdown()
Edited by Yashied
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...