Syntax:

CHDIR(path)

  • path: absolute or relative remote path, e.g. /www/htdocs/cgi-bin or htdocs/cgi-bin

Return value:

If this command is executed successfully it will return “OK” . If it encounters an error it will return an error code.

See also:

CWDIR
MKDIR
RMDIR

Examples

# Connect to ftp.myftp.com
OPENHOST("ftp.myftp.com","myuser","mypassword")
 
# Change current remote directory to /help/images
CHDIR("/help/images")
 
# Change current local dir to C:\dest_dir\help/images\
LOCALCHDIR("C:\dest_dir\help/images\")
 
# Download all files from the current remote
# directory which is now /help/images
GETFILE("*.*")
 
CLOSEHOST