CURL.SetOptionNETRCFile
-----------------------

Sets the full path to the netrc file.

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

MBS( "CURL.SetOptionNETRCFile"; curl; Value { ; Encoding } ) 

**MBS**( **"CURL.SetOptionNETRCFile";** /\* Sets the full path to the netrc file. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**; /\* The file path.e.g. $path \*/   
**$Encoding**) /\* Optional; The text encoding for text parameter.   
Default is UTF-8.e.g. "UTF8" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl |  |
| Value | The file path. | $path |  |
| Encoding | The text encoding for text parameter.    Default is UTF-8.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | "UTF8" | Optional |

### Result

Returns "OK" on success.

### Description

Sets the full path to the netrc file.  
Pass a text string containing the full path name to the file you want libcurl to use as .netrc file. If this option is omitted, and [CURL.SetOptionNetRC](CURLSetOptionNetRC.md) is set, libcurl will attempt to find a .netrc file in the current user's home directory.  
  
Starting with version 8.0 the plugin will always use UTF-8 encoding for file path on Linux and macOS. For macOS we also do the unicode character normalization for file names for you.  
See also [NETRC\_FILE](https://curl.haxx.se/libcurl/c/CURLOPT_NETRC_FILE.html) option in CURL manual.

### See also

- [CURL.SetOptionCookieFile](CURLSetOptionCookieFile.md)
- [CURL.SetOptionCRLFile](CURLSetOptionCRLFile.md)
- [CURL.SetOptionNetRC](CURLSetOptionNetRC.md)
- [CURL.SetOptionRandomFile](CURLSetOptionRandomFile.md)

### Release notes

- **Version 8.0**
    - Changed [CURL.SetOptionCAINFO](http://www.mbsplugins.eu/CURLSetOptionCAINFO.shtml), [CURL.SetOptionCAPATH](http://www.mbsplugins.eu/CURLSetOptionCAPATH.shtml), [CURL.SetOptionCookieFile](http://www.mbsplugins.eu/CURLSetOptionCookieFile.shtml), [CURL.SetOptionCookieJar](http://www.mbsplugins.eu/CURLSetOptionCookieJar.shtml), [CURL.SetOptionIssuerCert](http://www.mbsplugins.eu/CURLSetOptionIssuerCert.shtml), [CURL.SetOptionNETRCFile](http://www.mbsplugins.eu/CURLSetOptionNETRCFile.shtml), [CURL.SetOptionRandomFile](http://www.mbsplugins.eu/CURLSetOptionRandomFile.shtml), [CURL.SetOptionSSHPrivateKeyfile](http://www.mbsplugins.eu/CURLSetOptionSSHPrivateKeyfile.shtml), [CURL.SetOptionSSHPublicKeyfile](http://www.mbsplugins.eu/CURLSetOptionSSHPublicKeyfile.shtml), [CURL.SetOptionSSLCert](http://www.mbsplugins.eu/CURLSetOptionSSLCert.shtml), [CURL.SetOptionSSLKey](http://www.mbsplugins.eu/CURLSetOptionSSLKey.shtml) to use always UTF-8 on Mac/Linux and on Mac do the unicode transformation for decomposed characters to avoid trouble with special characters in file paths.

### Blog Entries

- [MBS FileMaker Plugin, version 7.6pr3](https://www.mbsplugins.de/archive/2017-12-13/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 12nd December 2017

  
[CURL.SetOptionMimeOptions](CURLSetOptionMimeOptions.md) - [CURL.SetOptionNetRC](CURLSetOptionNetRC.md)

[HTML Version](CURLSetOptionNETRCFile.shtml)