Sign in to follow this  
Followers 0
Lenny

_Ftp.au3 -> _FTP_Put Problem

3 posts in this topic

#1 ·  Posted (edited)

Good evening!

My English is not so good, but I will try to explain my Problem :P

I bought a ftp server. Now I want to upload a file on the server, using _Ftp.au3 (latest version)

Here's my code:

$server = 'svr'
$username = 'usr'
$pass = 'pwd'

$Hand = _FTPOpen('FTPCon','','','',1) ; Connect in Passiv Mode
; @Error: No Error
$Ftpc = _FTPConnect($Hand, $server, $username, $pass)
; @Error: No Error
_FtpPutFile($Hand, @Desktopdir"\myfile.txt", '/results/textfile.txt')
; @Error: -1
$Ftpc = _FTPClose($Hand)
; @Error: No Error

Does anyone know what this Error may cause?

Maybe its a general Problem ?

Thanks in Advance

Take Care

Lenny

Edited by Lenny

Share this post


Link to post
Share on other sites



At least you need to do this @Desktopdir & "\myfile.txt"


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Also, I think you should pass the return value of _FTPConnect(....) in the arguments of _FtpPutFile($Ftpc....) and not _FtpPutFile($Hand....)

$Ftpc = _FTPConnect($Hand, $server, $username, $pass)

; @Error: No Error

_FtpPutFile($Hand, @Desktopdir"\myfile.txt", '/results/textfile.txt')

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