CopyFile

From Free Pascal wiki
Revision as of 23:08, 11 December 2012 by Chronos (talk | contribs)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Template:Translate

Unit: Lazarus fileutil (UTF-8 replacements for FPC RTL code and additional file/directory handling)

function CopyFile(const SrcFilename, DestFilename: string): boolean;
function CopyFile(const SrcFilename, DestFilename: string; PreserveTime: boolean): boolean;

copyfile copies a source file to a destination file location. Optionally it preserves the file's timestamp.

Example:

uses 
...
fileutil
...
CopyFile('c:\autoexec.bat','c:\windows\temp\autoexec.bat.backup');