Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2    Statistic  


Enable wildcard matching.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
CURL 5.2 Yes Yes Yes Yes Yes
MBS( "CURL.SetOptionWildCardMatch"; curl; Value )   More


Parameter Description Example value
curl The CURL session handle. $curl
Value The new setting. Can be 1 (on) or 0 (off). 1


Returns OK or error.


Enable wildcard matching.
Set parameter to 1 if you want to transfer multiple files according to a file name pattern. The pattern can be specified as part of the OptionURL option, using an fnmatch-like pattern (Shell Pattern Matching) in the last part of URL (file name).

By default, libcurl uses its internal wildcard matching implementation.

A brief introduction of its syntax follows:

  • - ASTERISK*.txt (for all txt's from the root directory)


Question mark matches any (exactly one) character.


The left bracket opens a bracket expression. The question mark and asterisk have no special meaning in a bracket expression. Each bracket expression ends by the right bracket and matches exactly one character. Some examples follow:

[a-zA-Z0-9] or [f-gF-G] - character interval
[abc] - character enumeration
[^abc] or [!abc] - negation
[[:name:]] class expression. Supported classes are alnum,lower, space, alpha, digit, print, upper, blank, graph, xdigit.
[][-!^] - special case - matches only '-', ']', '[', '!' or '^'. These characters have no special purpose.
[\[\]\\] - escape syntax. Matches '[', ']' or '´.

Using the rules above, a file name pattern can be constructed:[a-z[:upper:]\\].jpeg

This feature is only supported for FTP download.

See also WILDCARDMATCH option in CURL manual.


Enable wildcard match:

MBS( "CURL.SetOptionWildCardMatch"; $curl; 1 )

Download several files via FTP:

Set Variable [$curl; Value:MBS("CURL.New")]
#Set URL with wildcard match
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; CURL Test::URL)]
#Set folder where to put files
Set Variable [$result; Value:MBS("CURL.SetBatchDestinationPath"; $curl; CURL Test::DestPath)]
Set Variable [$result; Value:MBS("CURL.SetOptionPassword"; $curl; CURL Test::Password)]
Set Variable [$result; Value:MBS("CURL.SetOptionUsername"; $curl; CURL Test::Name)]
#enable wildcard match
Set Variable [$result; Value:MBS("CURL.SetOptionWildCardMatch"; $curl; 1)]
#download them all
Set Field [CURL Test::Result; MBS("CURL.Perform"; $curl)]
#check results
Set Field [CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl)]
Set Field [CURL Test::FileNames; MBS("CURL.GetBatchFileNames"; $curl)]
Set Variable [$result; Value:MBS("CURL.Cleanup"; $curl)]

See also

Example Databases

Created 8th July 2015, last changed 19th December 2016

CURL.SetOptionVerbose   -   CURL.SetOptionXOAuth2Bearer

Feedback: Report problem or ask question.

MBS FileMaker Plugins