AutoIt
AutoIt
Create Directory on FTP Server
See more FTP Examples
_LANGUAGE_ example showing how to create a new directory on an FTP site.Chilkat AutoIt Downloads
Local $bSuccess = False
; This example requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oFtp = ObjCreate("Chilkat.Ftp2")
$oFtp.Hostname = "ftp.example.com"
$oFtp.Username = "login"
$oFtp.Password = "password"
; Connect and login to the FTP server.
$bSuccess = $oFtp.Connect()
If ($bSuccess <> True) Then
ConsoleWrite($oFtp.LastErrorText & @CRLF)
Exit
EndIf
; Create a new directory on the FTP server:
$bSuccess = $oFtp.CreateRemoteDir("newDirName")
If ($bSuccess <> True) Then
ConsoleWrite($oFtp.LastErrorText & @CRLF)
Exit
EndIf
$bSuccess = $oFtp.Disconnect()