CURL.SetOptionFileTime
----------------------

Whether to query file time.

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

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

**MBS**( **"CURL.SetOptionFileTime";** /\* Whether to query file time. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* Whether to query file time.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | Whether to query file time. | 1 |

### Result

Returns "OK" on success.

### Description

Whether to query file time.  
Pass a number. If it is 1, libcurl will attempt to get the modification date of the remote document in this operation. This requires that the remote server sends the time or replies to a time querying command. The [CURL.GetFileTime](CURLGetFileTime.md) function can be used after a transfer to extract the received time (if any).  
See also [FILETIME](https://curl.haxx.se/libcurl/c/CURLOPT_FILETIME.html) option in CURL manual.

### Examples

Try getting the file time:

 Set Variable \[ $curl ; Value: MBS ("[CURL.New](CURLNew.md)") \]  
\# put in some URL   
Set Variable \[ $r ; Value: MBS ("[CURL.SetOptionURL](CURLSetOptionURL.md)"; $curl ; "https://www.monkeybreadsoftware.com/filemaker/examples/test.txt") \]  
\# Only check if file exists, but don't download it   
Set Variable \[ $result ; Value: MBS ("[CURL.SetOptionNoBody](CURLSetOptionNoBody.md)"; $curl ; 1) \]  
\# Request to read file time   
Set Variable \[ $r ; Value: MBS ("CURL.SetOptionFileTime"; $curl ; 1) \]  
\# perform request   
Set Variable \[ $result ; Value: MBS ("[CURL.Perform](CURLPerform.md)"; $curl ) \]  
\#   
\# check result   
Set Field \[ CURL Test::Debug Messages ; Value: MBS ("[CURL.GetDebugMessages](CURLGetDebugMessages.md)"; $curl ) \]  
\# check response code: 200 if file exists or 404 if not found   
Set Variable \[ $responseCode ; Value: MBS ("[CURL.GetResponseCode](CURLGetResponseCode.md)"; $curl ) \]  
\# and get the time value   
Set Variable \[ $time ; Value: MBS ("[CURL.GetFileTime](CURLGetFileTime.md)"; $curl ) \]  
\# cleanup   
Set Variable \[ $result ; Value: MBS ("[CURL.Release](CURLRelease.md)"; $curl ) \]  
### See also

- [CURL.GetFileTime](CURLGetFileTime.md)
- [CURL.GetResponseCode](CURLGetResponseCode.md)
- [CURL.SetOptionCRLFile](CURLSetOptionCRLFile.md)
- [CURL.SetOptionMailFrom](CURLSetOptionMailFrom.md)
- [CURL.SetOptionNoBody](CURLSetOptionNoBody.md)
- [CURL.SetOptionPipeWait](CURLSetOptionPipeWait.md)
- [CURL.SetOptionTimeOut](CURLSetOptionTimeOut.md)
- [CURL.SetOptionTimeValue](CURLSetOptionTimeValue.md)
- [CURL.SetOptionURL](CURLSetOptionURL.md)
- [CURL.SetOptionUserName](CURLSetOptionUserName.md)

### Example Databases

- [CURL/CURL Download Picture](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/CURL%20Download%20Picture.shtml#1ScriptAnchor_)

Created 18th August 2014 , last changed 24th February 2026

  
[CURL.SetOptionFileOnlyMode](CURLSetOptionFileOnlyMode.md) - [CURL.SetOptionFollowLocation](CURLSetOptionFollowLocation.md)

[HTML Version](CURLSetOptionFileTime.shtml)