Libcurl ftp delete file

Hello everyone!

I need to delete a single file from the FTP server.

The libcurl how-to.txt file contains instructions for uploading, but I can’t find a way to delete the file.

How do I do this? Thank you very much.

Hi !
The simplest option:

! --- cURL

Loc:xRes     CURLcode
ThisCurl     TCurlFtpClass
 
  Code
  ThisCurl.Init()
  Loc:xRes = ThisCurl.SetUserPwd('User','Password')
  Loc:xRes = ThisCurl.SetOpt(CURLOPT_CONNECTTIMEOUT,30)
  Loc:xRes = ThisCurl.DeleteFile('FTP://Host','Path/FileName')
  If Loc:xRes = CURLE_OK ...
1 Like

Thank you very much for your help