Topic Path: Symbol Reference > Classes > TIdFTP Class > TIdFTP Methods > CombineFiles Method
TIdFTP.CombineFiles Method

Combines a list of local files into a single file on the FTP server.

procedure CombineFiles(
    const ATargetFile: String; 
    AFileParts: TIdStrings
File name on the FTP server.
Local file names to be combined into the target file name. 

CombineFiles is a procedure used to implement support for the FTP COMB command, which allows combining the list of local files in AFileParts into a single FTP server file with the name indicated in ATargetFile. 

CombineFiles can be sent to FTP servers that implmejnt support for the FTP COMB extension command (as indicated in Capabilities). If the FTP COMB command is not supported on the server, the CombineFiles methods performs no operation. 

ATargetFile indicates the file name to be used for storing the multiple file parts on the FTP server file system. ATargetFile must include a valid qualified path when specified. 

AFileParts contains the individual local files to be combined for storage on the FTP server. Entries in AFileParts must be in the correct order, and must appear as one file name per line with no delimiter characters. If an entry in AFileParts contains an embedded space character in the file name, the entire file name should be enclosed in Double Quote characters ("filename with spaces.txt"). 

CombineFiles sends the FTP COMB command, and expects the numeric response code 250 to indicate successful completion of the command. 

Please note that the FTP COMB is not widely supported on FTP servers at the present time. The GlobalSCAPE Secure FTP Server does implement support for FTP COMB command, and can be used for testing the capability.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.