Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to delete file from FTPS server (using LibCurlNet)

How to delete file from FTPS server (using LibCurlNet)

Scheduled Pinned Locked Moved Visual Basic
questioncsharpsysadminhelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Johan Hakkesteegt
    wrote on last edited by
    #1

    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.

    D 1 Reply Last reply
    0
    • J Johan Hakkesteegt

      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.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      J 1 Reply Last reply
      0
      • D 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 Kreskowiak

        J Offline
        J Offline
        Johan Hakkesteegt
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups