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.

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”.

Examples:

# 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

Command history

Since version 4.1 EBCDIC transfer mode is no longer supported

Return values

OK: If the transfer type has been changed successfully
18001: SETTYPE only works under plain FTP or FTPS. Use SETPROTOCOL to change the current protocol first.
18002: Since version 4.1 EBCDIC is no longer supported.
18003: Unsupported protocol. When using this command under SFTP.