Xbase++
Xbase++
Create Directory on FTP Server
See more FTP Examples
_LANGUAGE_ example showing how to create a new directory on an FTP site.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oFtp
nSuccess := 0
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
oFtp := CreateObject("Chilkat.Ftp2")
oFtp:Hostname := "ftp.example.com"
oFtp:Username := "login"
oFtp:Password := "password"
// Connect and login to the FTP server.
nSuccess := oFtp:Connect()
IF (nSuccess != 1)
? oFtp:LastErrorText
oFtp:destroy()
RETURN
ENDIF
// Create a new directory on the FTP server:
nSuccess := oFtp:CreateRemoteDir("newDirName")
IF (nSuccess != 1)
? oFtp:LastErrorText
oFtp:destroy()
RETURN
ENDIF
nSuccess := oFtp:Disconnect()
oFtp:destroy()