1CURLOPT_POSTQUOTE(3)       curl_easy_setopt options       CURLOPT_POSTQUOTE(3)
2
3
4

NAME

6       CURLOPT_POSTQUOTE - (S)FTP commands to run after the transfer
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode   curl_easy_setopt(CURL   *handle,  CURLOPT_POSTQUOTE,  struct
12       curl_slist *cmds);
13

DESCRIPTION

15       Pass a pointer to a linked list of FTP or SFTP commands to pass to  the
16       server  after  your FTP transfer request. The commands will only be run
17       if no error occurred. The linked list should be a fully valid  list  of
18       struct  curl_slist  structs  properly  filled  in as described for CUR‐
19       LOPT_QUOTE(3).
20
21       Disable this operation again by setting a NULL to this option.
22

DEFAULT

24       NULL
25

PROTOCOLS

27       SFTP and FTP
28

EXAMPLE

30       struct curl_slist *h = NULL;
31       h = curl_slist_append(h, "RNFR source-name");
32       h = curl_slist_append(h, "RNTO new-name");
33
34       curl = curl_easy_init();
35       if(curl) {
36         curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
37
38         /* pass in the FTP commands to run after the transfer */
39         curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
40
41         ret = curl_easy_perform(curl);
42
43         curl_easy_cleanup(curl);
44       }
45

AVAILABILITY

47       If support for the protocols are built-in.
48

RETURN VALUE

50       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
51       if not.
52

SEE ALSO

54       CURLOPT_QUOTE(3), CURLOPT_PREQUOTE(3),
55
56
57
58libcurl 7.66.0                   May 05, 2017             CURLOPT_POSTQUOTE(3)
Impressum