Topic Path: Symbol Reference > Classes > TIdFTP Class > TIdFTP Properties > TransferType Property
TIdFTP.TransferType Property

Indicates the file transfer type.

property TransferType: TIdFTPTransferType;

TransferType is a TIdFTPTransferType property that indicates the file transfer type currently in use for the FTP client, and can contain one of the following values: 


Binary (8 bit) file transfers 
ASCII (7 bit) file transfers 


An application should use the ftBinary transfer type for transferring executables, compressed files, graphics, and multimedia files. Use the ftASCII transfer type for 7bit ASCII files, such as text or Hypertext Markup Language. 

Changing the value in TransferType causes the FTP TYPE command to be sent when an active connection is available and the data channel is not in use. Note: If the data channel has already been assigned, changing the value in TransferType has no effect. 

TransferType is automatically sent (using the default value ftBinary) when Login is executed, and when Connect is called with the AutoLogin property set to True. 

The default value for TransferType is Id_TIdFTP_TransferType, as assigned during initialization of the component.

[Delphi] Setting TransferType for FTP GET operations.

  IdFTP1.TransferType := ftBinary;
  IdFTP1.Get('image.jpg', 'image.jpg', True, False);

  IdFTP1.TransferType := ftASCII;
  IdFTP1.Get('readme.txt', 'readme.txt', True, False);


[C++ Builder] Setting TransferType for FTP GET operations.

  IdFTP1->TransferType = ftBinary;
  IdFTP1->Get("image.jpg", "image.jpg", True, False);

  IdFTP1->TransferType = ftASCII;
  IdFTP1->Get("readme.txt", "readme.txt", True, False);
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.