next up previous
Next: Navigating Directories and Listing Up: Simple FTP Client Sessions Previous: Connecting to a server

Setting File Transmission Type

  It is critical that you set the correct file transmission type. There are two types:

ascii
-- transfer of text only files
binary
-- transfer of files that contain binary data, Images, audio, video, Word Documents, Spreadsheet Documents, most program data files etc.

It is generally not an error to transfer text files with binary files types. However, transferring binary files as text will result in the files being transferred incorrectly -- They will be of no use in any application. Note that ascii is the default transfer mode.

Note: Many recent graphical based FTP clients, such as Fetch, have an automatic mode. Do not rely on this method to work for binary files. Just try downloading a gif file this way!!!

You need to get used to recognising what file extensions mean to recognise the file type. See the following chapter 5 for this information. If in doubt about a file set binary type.

The following commands may be used to set file transfer type:

ascii
-- Set the "representation type" to "network ASCII".
binary
-- Set the "representation type" to "image".
type
[ type-name ] Set the "representation type" to type-name. The valid type-names are ascii for "network ASCII", binary or image for "image", and tenex for "local byte size" with a byte size of 8 (used to talk to TENEX machines). If no type is specified, the current type is printed. The default type is "network ASCII".

Clearly it is easy to use ascii and binary. The type command is more closely related to the FTP protocol as we will shortly see.


next up previous
Next: Navigating Directories and Listing Up: Simple FTP Client Sessions Previous: Connecting to a server
Dave Marshall
9/28/2001