Jump to content
Sign in to follow this  
FinalVersion

Ftp Problems

Recommended Posts

FinalVersion

#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

Share this post


Link to post
Share on other sites
Yashied

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

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.