Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Delphi ActiveXDelphi DLLVisual FoxProJavaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerShellPythonRubySQL ServerUnicode CUnicode C++Visual Basic 6.0VB.NETVBScript

Perl Examples

Certificates
Email Object
Encryption
FTP
HTML-to-XML/Text
Gzip
HTTP
IMAP
MHT / HTML Email
PFX/P12
Java KeyStore (JKS)
POP3
RSA Encryption
MIME
SMTP
Socket/SSL/TLS
SSH Key
SSH
SFTP
Tar Archive
XML
XMP
Zip

More Examples...
Amazon S3
Bounced Email
CSV
Diffie-Hellman
DKIM / DomainKey
NTLM

 

 

 

 

 

 

 

(Perl) Change Current Directory

To change the current remote directory, call ChangeRemoteDir.

Chilkat Perl Downloads

Perl Module for Windows, Linux, MAC OS X

use chilkat();

$ftp = new chilkat::CkFtp2();

#  Any string unlocks the component for the 1st 30-days.
$success = $ftp->UnlockComponent("Anything for 30-day trial");
if ($success != 1) {
    print $ftp->lastErrorText() . "\r\n";
    exit;
}

$ftp->put_Hostname("www.myftpserver.com");
$ftp->put_Username("****");
$ftp->put_Password("****");

#  Connect and login to the FTP server.
$success = $ftp->Connect();
if ($success != 1) {
    print $ftp->lastErrorText() . "\r\n";
    exit;
}

#  Set the current directory (on the FTP server) to the
#  "orders" subdirectory.  When logging into an FTP account,
#  current remote directory is automatically set to the
#  home directory of the FTP account.  From the FTP client's
#  perspective, it will be "/", but the absolute path on the
#  FTP server might be something like "/home/ftp_users/".
$success = $ftp->ChangeRemoteDir("orders");
if ($success != 1) {
    print $ftp->lastErrorText() . "\r\n";
    exit;
}

$ftp->Disconnect();
 

© 2000-2014 Chilkat Software, Inc. All Rights Reserved.