curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

RE: delete and rename files via ftp using libcurl

From: Darius Panahy via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 21 Nov 2022 14:39:13 +0000

Thanks, that worked.

-----Original Message-----
From: Daniel Stenberg <daniel_at_haxx.se>
Sent: 21 November 2022 14:33
To: Darius Panahy via curl-library <curl-library_at_lists.haxx.se>
Cc: Darius Panahy <darius.panahy_at_iet.co.uk>
Subject: Re: delete and rename files via ftp using libcurl

On Mon, 21 Nov 2022, Darius Panahy via curl-library wrote:

> I can do this with:
>
> curl_easy_setopt(curl, CURLOPT_URL,ftp://<host>/);
> curl_easy_setopt(curl, CURLOPT_USERPWD, "xxx:yyy"); cmdlist =
> curl_slist_append(cmdlist, "DELE /c/temp/ftp/a.txt");
> curl_easy_setopt(curl, CURLOPT_QUOTE, cmdlist); res =
> curl_easy_perform(curl);
>
> however after running the DELE command, curl also performs a LIST
> which I do not want since this could be the LIST of a large folder.

You can set CURLOPT_NOBODY which I believe will prevent it from downlading the "body" of the transfer.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-11-21