Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Whether to create missing directories.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
Value | Whether to create missing directories. (1, 2 or 0) | 2 |
Returns "OK" on success.
See also FTP_CREATE_MISSING_DIRS option in CURL manual.
Upload via FTP with creation of missing folders:
Set Variable [ $curl ; Value: MBS("CURL.New") ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionURL"; $curl; "ftp://ftp.monkeybreadsoftware.net/missingFolder/hello.txt") ]
# create any missing folders when uploading
Set Variable [ $result ; Value: MBS("CURL.SetOptionFTPCreateMissingDirs"; $curl; 1) ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionPassword"; $curl; CURL Test::Password) ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionUserName"; $curl; CURL Test::Name) ]
# we upload some text here.
Set Variable [ $result ; Value: MBS("CURL.SetInputText"; $curl; "Hello World!") ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionUpload"; $curl; 1) ]
# Run transfer
Set Field [ CURL Test::Result ; MBS("CURL.Perform"; $curl) ]
# Check debug messages for errors
Set Field [ CURL Test::debug ; MBS("CURL.GetDebugMessages"; $curl) ]
Set Variable [ $result ; Value: MBS("CURL.Release"; $curl) ]
Upload via SFTP and create missing diretories:
Set Variable [ $curl ; Value: MBS("CURL.New") ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionURL"; $curl; "sftp://ftp.monkeybreadsoftware.net/missingFolder/hello.txt") ]
# create any missing folders when uploading
Set Variable [ $result ; Value: MBS("CURL.SetOptionFTPCreateMissingDirs"; $curl; 1) ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionPassword"; $curl; CURL Test::Password) ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionUserName"; $curl; CURL Test::Name) ]
Set Variable [ $result ; Value: MBS( "CURL.SetOptionSSHAuthTypes"; $curl; 2+8 ) ]
# we upload some text here.
Set Variable [ $result ; Value: MBS("CURL.SetInputText"; $curl; "Hello World!") ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionUpload"; $curl; 1) ]
# Run transfer
Set Field [ CURL Test::Result ; MBS("CURL.Perform"; $curl) ]
# Check debug messages for errors
Set Field [ CURL Test::debug ; MBS("CURL.GetDebugMessages"; $curl) ]
Set Variable [ $result ; Value: MBS("CURL.Release"; $curl) ]
Created 18th August 2014, last changed 19th April 2020
CURL.SetOptionFTPAlternativeToUser - CURL.SetOptionFTPFileMethod