Internet Direct (Indy)
Home
PreviousUpNext
CopyFileTo Function

Copies the source file to the destination file.

Pascal
function CopyFileTo(
    const Source: string; 
    const Destination: string
): Boolean;
Parameters 
Description 
Source 
Source file name.
 
Destination 
Destination file name. 

Boolean - Indicates if the file was copied.

CopyFileTo is a function used to copy the file specified in Source to the file specified in Destination. 

CopyFileTo will return False if the file in Destination already exists. 

CopyFileTo encapsulates the platform-specific calls needed to perform the file copy operation. On the Windows platform, this is the Win32 API function CopyFile. On the Linux platform, CopyFileTo uses a TFileStream instance to create the destination file.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.