********** >* FTP.DLL handles FTP communication using a baked in copy of libcurl >***** > * Set the progress callback bind id > DECLARE INTEGER ftp_callback_bind_id IN (this.cDllName) ; > INTEGER wmftp_progress_callback_custom_id > * This is a custom value at or above WM_USER (0x400) > * Note: The default value is 0x3693 > > * No return value > DECLARE ftp_url IN (this.cDllName) ; > STRING cUrl > > * No return value > DECLARE ftp_credentials IN (this.cDllName) ; > STRING cName, ; && User name > STRING cPassword && Password > > * Returns positive for byte written, negative for error codes > DECLARE INTEGER ftp_put IN (this.cDllName) ; > STRING cLocalPathname, ; && The local pathname to send > STRING cPutPathname, ; && Where to put it on the remote server > STRING@ cResult, ; && Our return result text (if any) > INTEGER nResultLength, ; && Length of the return result text storage area > INTEGER nHwndCallback && See ftp_callback_bind_id() > > * Returns positive for bytes retrieved, negative for error codes > DECLARE INTEGER ftp_dir IN (this.cDllName) ; > STRING cRemotePath, ; && The remote path to inquire > STRING@ cDirText, ; && Our directory text returned from the remote > INTEGER nDirTextLength, ; && Length of the return result text storage area > INTEGER nHwndCallback && See ftp_callback_bind_id() > > * Returns positive for bytes retrieved, negative for error codes > DECLARE INTEGER ftp_get IN (this.cDllName) ; > STRING cGetPathname, ; && The remote pathname to retrieve > STRING cLocalPathname, ; && Where to put it on our local machine > STRING@ cResult, ; && Our return result text (if any) > INTEGER nResultLength, ; && Length of the return result text storage area > INTEGER nHwndCallback && See ftp_callback_bind_id() > > DECLARE INTEGER ftp_delete IN (this.cDllName) ; > STRING cDeletePathname, ; && The remote pathname to retrieve > STRING@ cResult, ; && Our return result text (if any) > INTEGER nResultLength, ; && Length of the return result text storage area > INTEGER nHwndCallback && See ftp_callback_bind_id() > > DECLARE INTEGER ftp_rename IN (this.cDllName) ; > STRING cRenameOldFilename, ; && Old remote pathname > STRING cRenameNewFilename, ; && New remote pathname > STRING@ cResult, ; && Our return result text (if any) > INTEGER nResultLength, ; && Length of the return result text storage area > INTEGER nHwndCallback && See ftp_callback_bind_id() > > DECLARE INTEGER ftp_md IN (this.cDllName) ; > STRING cNewDirectoryPathname, ; && New directory to create > STRING cResult, ; && Our return result text (if any) > INTEGER nResultLength, ; && Length of the return result text storage area > INTEGER nHwndCallback && See ftp_callback_bind_id() > > DECLARE INTEGER ftp_rd IN (this.cDllName) ; > STRING cRemoveDirectoryPathname, ; && Remote directory to remove > STRING cResult, ; && Our return result text (if any) > INTEGER nResultLength, ; && Length of the return result text storage area > INTEGER nHwndCallback && See ftp_callback_bind_id() > > * Note: CURL errors are less than 64 characters or so (I use 200 to be safe) > DECLARE INTEGER ftp_errorinfo IN (this.cDllName) ; > INTEGER nErrorNum, ; && The error code > STRING@ cErrorText, ; && Error text storage area > INTEGER nErrorTextLength && Length of the error text storage area>
ftp_url("ftps.path.to.whatever.com") >ftp_credentials("login", "password") >lcResult = SPACE(1024) >lnResult = ftp_put("c:\temp\file.zip", "/file.zip", @lcResult, LEN(lcResult), 0) >* Result is in LEFT(lcResult, lnResult)