CURL.SetOptionPostQuote
-----------------------

Sets the list of FTP or SFTP commands to pass to the server after your FTP transfer request.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionPostQuote"; curl; Value... ) 

**MBS**( **"CURL.SetOptionPostQuote";** /\* Sets the list of FTP or SFTP commands to pass to the server after your FTP transfer request. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value...**) /\* The ftp commands.e.g. "" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value... | The ftp commands. | "" |

### Result

Returns "OK" on success.

### Description

Sets the list of FTP or SFTP commands to pass to the server after your FTP transfer request.  
The commands will only be run if no error occurred. Disable this operation again by passing no value to this function.  
  
This option takes a list of items. So this function takes a variable number of arguments. If you call function with 2 parameters, you set an empty list. If you call it with 5 parameters, you set a list with 3 values.  
If you want to do a ftp operation instead of download/upload/directory listing, please use [CURL.SetOptionQuote](CURLSetOptionQuote.md).  
  
See also [CURL.SetOptionQuote](CURLSetOptionQuote.md) and [CURL.SetOptionPreQuote](CURLSetOptionPreQuote.md).  
File names may be passed with quotes to include spaces in file names.  
  
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.  
Please repeat Value parameter as often as you need.  
See also [POSTQUOTE](https://curl.haxx.se/libcurl/c/CURLOPT_POSTQUOTE.html) option in CURL manual.

### Examples

Create folder in FTP:

 MBS ( "CURL.SetOptionPostQuote"; $curl ; "MKD testfolder" )  
Rename file using two FTP commands:

 MBS ( "CURL.SetOptionPostQuote" ; $curl ; "RNFR foo.txt"; "RNTO bar.txt" )  
Delete file after upload for FTP:

 MBS ( "CURL.SetOptionPostQuote"; $curl ; "DELE docs/test.txt" )  
  
// URL is to domain only and relative path in quote.  
Delete folder after upload:

 MBS ( "CURL.SetOptionPostQuote"; $curl ; "RMD testfolder" )  
Set file permissions:

 MBS ( "CURL.SetOptionPostQuote" ; $curl ; "SITE CHMOD 777 testfile")  
Call with three parameters:

 MBS ( "CURL.SetOptionPostQuote"; handle; $value1 ; $value2 ; $value3 )  
Rename file for SFTP commands:

 MBS ( "CURL.SetOptionPostQuote" ; $curl ; "rename \\"old name.txt\\" \\"new namew.txt\\"" )  
Create folder with SFTP:

 Set Variable \[ $result ; Value: MBS ( "CURL.SetOptionPostQuote"; $curl ; "mkdir testPost" ) \]  
### See also

- [CURL.GetOptionPostQuote](CURLGetOptionPostQuote.md)
- [CURL.GetOptionPreQuote](CURLGetOptionPreQuote.md)
- [CURL.SetOptionPassword](CURLSetOptionPassword.md)
- [CURL.SetOptionPost](CURLSetOptionPost.md)
- [CURL.SetOptionPostFields](CURLSetOptionPostFields.md)
- [CURL.SetOptionPostRedir](CURLSetOptionPostRedir.md)
- [CURL.SetOptionPreQuote](CURLSetOptionPreQuote.md)
- [CURL.SetOptionProtocols](CURLSetOptionProtocols.md)
- [CURL.SetOptionProxyAuth](CURLSetOptionProxyAuth.md)
- [CURL.SetOptionQuote](CURLSetOptionQuote.md)

### Blog Entries

- [SFTP Upload with temporary file](https://www.mbsplugins.de/archive/2023-03-06/SFTP_Upload_with_temporary_fil/monkeybreadsoftware_blog_filemaker)
- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 5th June 2021

  
[CURL.SetOptionPostFields](CURLSetOptionPostFields.md) - [CURL.SetOptionPostRedir](CURLSetOptionPostRedir.md)

[HTML Version](CURLSetOptionPostQuote.shtml)