Jump to content
Sign in to follow this  
felixli93

Problems with FTP UDF

Recommended Posts

felixli93

Hi,

I've got some problems with the FTP UDF.

Commands as:

_FTPOpen

_FTPConnect

_FTPRenameFile

_FTPMakeDir (Returns 0 / error if directory already exists)

_FTPDelDir

_FTPGetFileSize

_FTPGetCurrentDir

_FTPSetCurrentDir

_FTPFindFileFirst

_FTPFindFileNext

_FTPFindFileClose

_FTPClose

are working just fine, but _FTPPutFile and _FTPGetFile just don't work!

my FTPserver always returns a timeout for the connection.

so where's the problem?

Share this post


Link to post
Share on other sites
Yashied
felixli93

thank you, looks nice!

but why does _FTP_ReadFile($hFile, $tBuffer, $nSize) return the size of the file?

Share this post


Link to post
Share on other sites
Yashied

thank you, looks nice!

but why does _FTP_ReadFile($hFile, $tBuffer, $nSize) return the size of the file?

_FTP_ReadFile() returns number of bytes read. For the case, if the file size is less than the buffer size. But you can use _FTP_GetFile() and _FTP_PutFile().

Share this post


Link to post
Share on other sites
felixli93

Just for your info: In latest Autoit beta version there is FTP as standard include UDF.

thank you for this information. just downloaded the beta :)

but don't I need the _FTP_Startup function any more? it's not part of the include.

_FTP_ReadFile() returns number of bytes read. For the case, if the file size is less than the buffer size. But you can use _FTP_GetFile() and _FTP_PutFile().

so there's no function to just return the data in the file?

//edit: ok, using _InetGetSource should just work also fine ^^

thanks guys

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  

×