Sign in to follow this  
Followers 0
indecisive

FTPConnect and _FtpPutFile isn't working

3 posts in this topic

Hi! im trying to create a sc ript that would transfer a file from localhost to the ftp.

however FTPConnect and _FtpPutFile isn't working.

probably i missed some important lines etc.

could you help me? thanks :huh2:

the code is shown below.

note: we didn't require username and password to access the ftp so uname and password was given no value.

#include<ftp.au3>

$__ftp_hWinInetDll = DllOpen( 'wininet.dll' )
If $__ftp_hWinInetDll == -1 Then
    ConsoleWrite( "-- ERROR FROM FTP.au3: Unable to open WinInet.dll" & @LF )
    $__ftp_hWinInetDll = 'wininet.dll'
EndIf

$server = 'ftp://***.***.**.***/'
$username = ''
$pass = ''

$Open = _FTPOpen('MyFTP Control')
$Conn = _FTPConnect($Open, $server, $username, $pass)
$Ftpp = _FtpPutFile($Conn, 'C:\*******\net.txt', '/sample.txt')
$Ftpc = _FTPClose($Open)

Share this post


Link to post
Share on other sites



use:

username: anonymous

passwd: (anything)

Share this post


Link to post
Share on other sites

hi wack0. why do i have to put a value in uname and password field if we already set the accessibility of the ftp to be public?

anyway, i've tried putting value to both fields but it didn't work. thanks .

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