Sample Chilkat FTP script

The following is a Sample script for the Chilkat FTP component.

<%
'## Create object
Set objConnect = Server.CreateObject("Chilkatftp.ChilkatFTP")
'## Get hostname
objConnect.HostName = ("Host address")
'## Get FTP username
objConnect.Username = ("user")
'## Get FTP password
objConnect.Password = ("pass")
'## Connect to server
objConnect.Connect()
'## Get connect status
If objConnect.IsConnected = 1 Then
'## Change dir
objConnect.ChangeRemoteDir("Directory")
If objConnect.CreateRemoteDir ("Directory") = 1 Then
Response.Write "It Worked!"
Else
Response.Write objConnect.ErrorLogHtml
End If
Else
Response.Write "Failed to connect to the server!"
End If
'## Disconnect
objConnect.Disconnect()
%>

Add Feedback