Jump to content

FTP creating and reading files help


Recommended Posts

#include <FTPEx.au3>
Local $sServer = 'ftp.lukeisreallycool.tk'
Local $sUsername = 'username'
Local $sPass = 'password'
Local $sRemote = InputBox ("file", "what file would you like to create?")

Local $hOpen = _FTP_Open('MyFTP Control')
Local $hConn = _FTP_Connect($hOpen, $sServer, $sUsername, $sPass)
sleep(5000)
;FTP connected at this point

_FTP_DirCreate ( $hConn, $sRemote )

Local $iFtpc = _FTP_Close($hConn)
Local $iFtpo = _FTP_Close($hOpen)

that's all I have so far, its composed from the help file mostly as I have no clue what I'm doing. If I run the script it goes all the way through with no errors but does not create any new dir's on my ftp website ;_;

Link to comment
Share on other sites

well I have encountered yet another problem...

I'm trying to read a file in my FTP server and it keeps returning gibberish, like 0xA7SAD5HSE4. How do i make it return text? heres the code:

#include <Array.au3>
#include <FTPEx.au3>


    Local $open = _FTP_Open("FTPtest")
    Local $connect = _FTP_Connect($open, 'ftp.lukeisreallycool.tk', 'username', 'password')
    _ftp_dirsetcurrent($connect,"/")
    Local $ftpfile = '/alpha.txt'
    $ftpopen = _FTP_FileOpen($connect, $ftpfile)
    MsgBox(1, "test", _FTP_FileRead( $ftpopen, 40))

I have no idea what I'm doing wrong O_O

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...