How to delete file from FTPS server (using LibCurlNet)
-
Hi, I am dealing with an old FTPS server. (not to be mistaken for SFTP) I can connect to it using LibCurlNet. (couldn't get it to work with .net's FtpWebRequest / FtpWebResponse) using the following code:
With easy
.SetOpt(CURLoption.CURLOPT_URL, _URI)
.SetOpt(CURLoption.CURLOPT_SSL_VERIFYPEER, False)
.SetOpt(CURLoption.CURLOPT_SSL_VERIFYHOST, False)
.SetOpt(CURLoption.CURLOPT_FTP_SSL, CURLftpSSL.CURLFTPSSL_TRY)'For debugging will print received data to console .SetOpt(CURLoption.CURLOPT\_DEBUGFUNCTION, New Easy.DebugFunction(AddressOf GetFileList)) .SetOpt(CURLoption.CURLOPT\_VERBOSE, True) 'Get directory listing .SetOpt(CURLoption.CURLOPT\_FTPLISTONLY, True) Dim code As CURLcode = .Perform() If code = CURLcode.CURLE\_OK Then 'Console.WriteLine() If blnFileListSuccess Then If file\_list.Count > 0 Then bResult = ProcessResults.AllroundSuccess End If Else bResult = ProcessResults.FTPConnectionFailure End If .Cleanup() End With
(with adaptations for each action of course) I can list files. I can download files. I can upload files. But I cannot delete files.That is, I don't know how to do it with LibCurlNet. So my question is this, can anyone tell me how to delete files from an ftp server using LibCurlNet ? Or alternatively, can anyone tell me how to connect to, and interact with, FTPS using normal .net ? All help much appreciated. Regards, Johan
My advice is free, and you may get what you paid for.
-
Hi, I am dealing with an old FTPS server. (not to be mistaken for SFTP) I can connect to it using LibCurlNet. (couldn't get it to work with .net's FtpWebRequest / FtpWebResponse) using the following code:
With easy
.SetOpt(CURLoption.CURLOPT_URL, _URI)
.SetOpt(CURLoption.CURLOPT_SSL_VERIFYPEER, False)
.SetOpt(CURLoption.CURLOPT_SSL_VERIFYHOST, False)
.SetOpt(CURLoption.CURLOPT_FTP_SSL, CURLftpSSL.CURLFTPSSL_TRY)'For debugging will print received data to console .SetOpt(CURLoption.CURLOPT\_DEBUGFUNCTION, New Easy.DebugFunction(AddressOf GetFileList)) .SetOpt(CURLoption.CURLOPT\_VERBOSE, True) 'Get directory listing .SetOpt(CURLoption.CURLOPT\_FTPLISTONLY, True) Dim code As CURLcode = .Perform() If code = CURLcode.CURLE\_OK Then 'Console.WriteLine() If blnFileListSuccess Then If file\_list.Count > 0 Then bResult = ProcessResults.AllroundSuccess End If Else bResult = ProcessResults.FTPConnectionFailure End If .Cleanup() End With
(with adaptations for each action of course) I can list files. I can download files. I can upload files. But I cannot delete files.That is, I don't know how to do it with LibCurlNet. So my question is this, can anyone tell me how to delete files from an ftp server using LibCurlNet ? Or alternatively, can anyone tell me how to connect to, and interact with, FTPS using normal .net ? All help much appreciated. Regards, Johan
My advice is free, and you may get what you paid for.
Since it's extremely unlike you're going to run into anyone who has used that library here, I suggest you ask in a forum dedicated to that library. Click here[^].
A guide to posting questions on CodeProject
How to debug small programs
Dave Kreskowiak -
Since it's extremely unlike you're going to run into anyone who has used that library here, I suggest you ask in a forum dedicated to that library. Click here[^].
A guide to posting questions on CodeProject
How to debug small programs
Dave KreskowiakThanks Dave, you are right of course, but I had to try everything. Regards, Johan
My advice is free, and you may get what you paid for.