- GETTING STARTED
- GUIDES
- COMMANDS
- Server connection
- File Transfer
- Directory operations
- File operations
- Script output
- Miscellaneous
- OTHER
SETTYPE
Set the file transfer type.
Syntax: SETTYPE(type)
- type:
BINARY Default and most common transfer type. Files will be transferred without applying any transformation. ASCII In text files Unix and Windows systems use different characters like line feed or carriage return to indicate new lines etc. Choose this transfer type if you want special characters contained in text files to be transformed automatically, thus keeping text files readable on both Unix and Windows systems. EBCDIC Some IBM mainframes employ EBCDIC for representing text characters. Use this transfer type to automatically transform characters and keep text files readable.
Remarks:
Binary transfer type is used by default. If you do not use a transfer type other than binary there will be no need to invoke SETTYPE in your script.
See also:
SETPASSIVE
GETFILE
PUTFILE
SYNC
Return Value:
This command always returns "OK".
Example:
# Connect to ftp.myhost.com as myuser and download all
# txt files using the ASCII transfer type.
# Go back to BINARY transfer type and download all image files
LOCALCHDIR("C:\dest_dir")
OPENHOST("ftp.myhost.com","myuser","mypassword")
SETTYPE(ASCII)
GETFILE("textfiles/*.*")
SETTYPE(BINARY)
GETFILE("images/*.*")
CLOSEHOST

