- GETTING STARTED
- GUIDES
- COMMANDS
- Server connection
- File Transfer
- Directory operations
- File operations
- Script output
- Miscellaneous
- OTHER
CHDIR
Change the current remote directory.
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.
Example:
# 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

