Troubles with FTP
Hi all,
I’m having some troubles with FTP connection.
I want to transfer files from my local drive to a FTP server. But the files won’t copy. When I debug it it looks like the files are copied before the FTPDisconnect and after the FTPDisconnect command they disappear again? The response error is always 0
There’s no issue with access rights because I can just copy the files with FileZilla.
I use following code for it.
FTPConnect (‘****’,’****’,’*****’,21,”,2,kFalse) Returns socket
If socket<0
Calculate msg as con('Failed to connect to ftp server ','*****')
OK message Error {[msg]}
Quit method kFalse
End If
FTPCwd (socket,'../Equipment/PDF/Test')
FTPType (socket,kTrue) Returns status
Do FileOps.$filelist(kFileOpsIncludeFiles+kFileOpsIncludeDirectories,pPath,kFileOpsInfoName+kFileOpsInfoFullName) Returns listFiles
For listFiles.$line from 1 to listFiles.$linecount() step 1
If upp(right(listFiles.C1,4))='.PDF'
FTPType (socket,0) Returns error
Calculate name as listFiles.name
Calculate fullname as listFiles.fullname
FTPPut (socket,fullname,name) Returns error
If not(error)
; Do FileOps.$deletefile(listFiles.fullname)
Else
Breakpoint
End If
End If
End For
FTPDisconnect (socket) Returns error
Met vriendelijke groeten,
An Bayens
Product Manager
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com