Difference between revisions of "CopyFile"
From Free Pascal wiki
Jump to navigationJump to searchLine 1: | Line 1: | ||
{{Translate}} | {{Translate}} | ||
− | Unit: Lazarus | + | Unit: Lazarus [[fileutil]] (UTF-8 replacements for FPC RTL code and additional file/directory handling) |
<syntaxhighlight> | <syntaxhighlight> |
Revision as of 12:24, 25 June 2014
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');
Function result Returns True if successful, False if there was an error